[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Devel glibc, -D_FORTIFY_SOURCE=2 and zzuf



Hi,

zzuf's build fails due to the open-is-a-function-like-macro changes in devel 
glibc.  The failure is in src/lib-fd.c, but I'm not quite enough a C 
programmer to tell for sure what the proper fix is in this case, it's less 
straight forward than others I've encountered.

The patch below fixes the build, as would IIRC changing "int NEW(open)" 
to "int NEW((open))" and "int NEW(open64)" to "int NEW((open64))" IIRC.  I 
have no devel system to test the results with (esp. the latter if it works at 
all) so help is welcome - which of these (or something else) is the preferred 
fix?  I tried to contact upstream too, no response so far.


Index: src/lib-fd.c
===================================================================
--- src/lib-fd.c	(revision 304)
+++ src/lib-fd.c	(working copy)
@@ -148,12 +148,14 @@
         } \
     } while(0)
 
+#undef open
 int NEW(open)(const char *file, int oflag, ...)
 {
     int ret; OPEN(open); return ret;
 }
 
 #if defined HAVE_OPEN64
+#undef open64
 int NEW(open64)(const char *file, int oflag, ...)
 {
     int ret; OPEN(open64); return ret;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]