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;
Hi,
On Sun, 19 Aug 2007 18:20:29 +0200, Ville Skyttä wrote: ...
zzuf's build fails due to the open-is-a-function-like-macro changes in devel glibc.
the fix is something like the attached patch, please tune the details yourself. You need to avoid the macro expansion and parentheses are harmless.
The glibc change still should be POSIX compliant: http://sources.redhat.com/ml/gdb-patches/2007-08/msg00165.html
Regards, Jan
--- zzuf-0.9-orig/src/lib-fd.c 2007-07-06 15:40:55.000000000 +0200 +++ zzuf-0.9/src/lib-fd.c 2007-08-19 20:44:04.000000000 +0200 @@ -148,13 +148,13 @@ static int (*ORIG(close)) (int fd) } \ } while(0)
-int NEW(open)(const char *file, int oflag, ...) +int (NEW(open))(const char *file, int oflag, ...) { int ret; OPEN(open); return ret; }
#if defined HAVE_OPEN64 -int NEW(open64)(const char *file, int oflag, ...) +int (NEW(open64))(const char *file, int oflag, ...) { int ret; OPEN(open64); return ret; }