[Udpcast] [patch] Fix FTBFS on GCC 4.7

Richard W.M. Jones rjones at redhat.com
Wed Feb 20 14:52:33 CET 2013


On Sat, Feb 16, 2013 at 03:24:39AM +0100, Michal Petrucha wrote:
> I tried building udpcast on a current Arch Linux today and I got the
> following error:
> 
> gcc -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wall -Wall -DBB_FEATURE_UDPCAST_FEC -D_FILE_OFFSET_BITS=64 -DUSE_SYSLOG -DUSE_ASSEMBLER -O6 -DNO_BB -I.  -I.   -c -o console.o console.c
> In file included from console.c:7:0:
> console.h:25:9: error: unknown type name 'fd_set'
> 
> Luckily, a fix is fairly straightforward; the definition of fd_set was
> moved into a different header (which is included anyway). See the
> attached patch.
> 
> Michal Petrucha

I hit the same bug on Fedora Rawhide a few days ago, and came up with
a different patch which I think is more correct than the one posted by
Michal, because it doesn't assume that Win32 has <sys/select.h> (I
have no idea if it does or not).

See attached.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
-------------- next part --------------
diff -ur udpcast-20120424.old/console.h udpcast-20120424/console.h
--- udpcast-20120424.old/console.h	2005-12-22 22:59:18.000000000 +0000
+++ udpcast-20120424/console.h	2013-02-20 12:52:52.267583033 +0000
@@ -4,7 +4,9 @@
 #ifdef __MINGW32__
 #include <winsock2.h>
 #include <winbase.h>
-#endif /* __MINGW32__ */
+#else /* !__MINGW32__ */
+#include <sys/select.h>
+#endif /* !__MINGW32__ */
 
 #define prepareConsole udpc_prepareConsole
 #define getConsoleFd udpc_getConsoleFd


More information about the Udpcast mailing list