[MacPorts] #23834: glib2 @2.22.4 breaks when compiling in Snow Leopard

MacPorts noreply at macports.org
Wed Feb 24 16:49:06 PST 2010


#23834: glib2 @2.22.4 breaks when compiling in Snow Leopard
-----------------------------------+----------------------------------------
 Reporter:  daniel.koch@…          |       Owner:  ryandesign@…           
     Type:  defect                 |      Status:  new                    
 Priority:  Normal                 |   Milestone:                         
Component:  ports                  |     Version:  1.8.2                  
 Keywords:                         |        Port:  glib2                  
-----------------------------------+----------------------------------------

Comment(by daniel.koch@…):

 Hi.

 I hacked the glocalfile.c source code and now I can compile glib2
 successfully.

 In the beginning of file we have ifdefs to choice to use STATVFS or
 STATFS, as follows:

 {{{
 #if defined(HAVE_STATFS) && defined(HAVE_STATVFS)
 /* Some systems have both statfs and statvfs, pick the
    most "native" for these */
 # if !defined(HAVE_STRUCT_STATFS_F_BAVAIL)
    /* on solaris and irix, statfs doesn't even have the
       f_bavail field */
 #  define USE_STATVFS
 # else
   /* at least on linux, statfs is the actual syscall */
 #  define USE_STATFS
 # endif

 #elif defined(HAVE_STATFS)

 # define USE_STATFS

 #elif defined(HAVE_STATVFS)

 # define USE_STATVFS

 #endif
 }}}

 I dont know what's it, but I've checked includes and STATFS (struct
 statfs) isn't included (and defined). I checked the file
 /usr/include/sys/statvfs.h and found only statvfs.

 Then I hacked this file by adding the following code, then I force source
 to use statvfs instead, solving *my* problem.

 {{{
 #undef USE_STATFS
 #define USE_STATVFS
 }}}

-- 
Ticket URL: <http://trac.macports.org/ticket/23834#comment:4>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list