I am trying to compile rsync 3.0.0cvs with the flags.diff patch on a Mac OSX G4. It fails because the flags UF_NOUNLINK, and SF_NOUNLINK do not exist on this platform. sys/stat.h only gives the following flags * Definitions of flags stored in file flags word. * * Super-user and owner changeable flags. */ #define UF_SETTABLE 0x0000ffff /* mask of owner changeable flags */ #define UF_NODUMP 0x00000001 /* do not dump file */ #define UF_IMMUTABLE 0x00000002 /* file may not be changed */ #define UF_APPEND 0x00000004 /* writes to file may only append */ #define UF_OPAQUE 0x00000008 /* directory is opaque wrt. union */ /* * Super-user changeable flags. */ #define SF_SETTABLE 0xffff0000 /* mask of superuser changeable flags */ #define SF_ARCHIVED 0x00010000 /* file is archived */ #define SF_IMMUTABLE 0x00020000 /* file may not be changed */ #define SF_APPEND 0x00040000 /* writes to file may only append */ #endif However, after defining the missing flags in rsync.h I still get the following errors: gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c flist.c -o flist.o flist.c: In function 'send_file_entry': flist.c:381: error: 'struct file_struct' has no member named 'fileflags' flist.c:384: error: 'struct file_struct' has no member named 'fileflags' flist.c: In function 'recv_file_entry': flist.c:815: error: request for member 'unum' in something not a structure or union flist.c: In function 'make_file': flist.c:1128: error: request for member 'unum' in something not a structure or union make: *** [flist.o] Error 1 The rsync-2.6.9 source and flags patch compile without problems.
On Thu, Mar 29, 2007 at 12:44:11AM +0200, smokin.jake@mac.com wrote:> However, after defining the missing flags in rsync.h I still get the > following errors:There were a bunch of old code idioms in that patch due to my inability to compile file-flags on my systems. I kluged something together to make it work, and the latest version builds now.> The rsync-2.6.9 source and flags patch compile without problems.What about the UF_NOUNLINK, and SF_NOUNLINK flags? Or is that after your tweak to define them. I'm thinking about adding this to the source in rsync.c: #ifndef UF_NOUNLINK #define UF_NOUNLINK 0 #endif #ifndef SF_NOUNLINK #define SF_NOUNLINK 0 #endif ..wayne..