Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#921 closed patch (fixed)

musl libc - canonicalize_file_name

Reported by: tbk Owned by: Christian Franke
Priority: minor Milestone: Release 7.0
Component: all Version: 6.6
Keywords: linux Cc:


Hi there,

I tried to build the new version (6.6) on Alpine Linux, unfortenally canonicalize_file_name is not not part of musl's stdlib.

The issue was introduced in r4365:

[r4365] (108.2 kB) by chrfranke 2016-11-10 19:42:24 

os_linux.cpp: Don't detect devices behind hpsa driver as regular SCSI
devices. Suggest to use '-d cciss,N' instead.

Based on patch provided by Stanislav Brabec.

I have patched os_linux.cpp with the following to make it work:

--- a/os_linux.cpp
+++ b/os_linux.cpp
@@ -3176,7 +3176,7 @@
   char path[128];
   snprintf(path, sizeof(path), "/sys/block/%s/device", name);
-  char * syshostpath = canonicalize_file_name(path);
+  char * syshostpath = realpath(path, NULL);
   if (!syshostpath)
     return false;

Attachments (1)

musl-canonicalize_file_name.patch (353 bytes) - added by tbk 6 years ago.

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by tbk

comment:1 Changed 6 years ago by Christian Franke

Milestone: Release 6.7
Owner: set to Christian Franke
Status: newaccepted

comment:2 Changed 6 years ago by Christian Franke

Keywords: linux added
Resolution: fixed
Status: acceptedclosed

Fixed in r4603. Thanks.

comment:3 in reply to:  2 Changed 5 years ago by Christian Franke

Your patch was OK, my commit r4603 wasn't. Now finally fixed in r4854, thanks to GH pull/23.

comment:4 Changed 5 years ago by Christian Franke

Milestone: Release 6.7Release 7.0

Milestone renamed

Note: See TracTickets for help on using tickets.