Version: (using KDE Devel) Installed from: Compiled sources Compiler: gcc version 2.95.3 20010315 (release) using autoconf 2.53 OS: Solaris Trying to compile arts on my Solaris 8 x86 box breaks with source='artsdsp.c' object='artsdsp.lo' libtool=yes \ depfile='.deps/artsdsp.Plo' tmpdepfile='.deps/artsdsp.TPlo' \ depmode=gcc /bin/ksh ../admin/depcomp \ /bin/ksh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../mcop -I../flow -I../flow -I../soundserver -I../libltdl -I/vol/kde-cvs/include -I/vol/qt-3.2.3/include -I/vol/local/include -I/vol/graphics/include -I/opt/oss/include -I../libltdl -DQT_THREAD_SUPPORT -I/opt/oss/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4 -D_REENTRANT -I/vol/gtk-2.2.0/include/glib-2.0 -I/vol/gtk-2.2.0/lib/glib-2.0/include -DARTSC_BACKEND='"/vol/kde-cvs/lib/libartscbackend.la"' -O2 -D_REENTRANT -I/vol/gtk-2.2.0/include/glib-2.0 -I/vol/gtk-2.2.0/lib/glib-2.0/include -c -o artsdsp.lo `test -f 'artsdsp.c' || echo './'`artsdsp.c artsdsp.c:262: conflicting types for `ioctl' /usr/include/unistd.h:315: previous declaration of `ioctl' make[2]: *** [artsdsp.lo] Error 1 make[2]: Leaving directory `/vol/src/kde/cvs/arts/artsc' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/vol/src/kde/cvs/arts' make: *** [all] Error 2 This happens because configure incorrectly detects the prototype of ioctl() and writes #define HAVE_IOCTL_INT_ULONGINT_DOTS 3 to config.h while ioctl(2) says the prototpe is int ioctl(int fildes, int request, /* arg */ ...), so it should read #define HAVE_IOCTL_INT_INT_DOTS 1
Created attachment 4082 [details] patch for arts/configure.in.in The attached patch fixes this issue for me by adding an "#include <unistd.h>" to the autoconf test. I have a bad feeling about adding this unconditionally but #ifdef HAVE_UNISTD_H doesn't seem to be an option in this place... Please note that this patch also contains the fix for bug 68382.
Subject: arts CVS commit by coolo: including unistd.h is fine - we do it everywhere else too :) CCMAIL: 72311-done@bugs.kde.org M +3 -0 configure.in.in 1.97 --- arts/configure.in.in #1.96:1.97 @@ -347,4 +347,5 @@ AC_TRY_COMPILE( [ + #include <unistd.h> #include <sys/ioctl.h> int ioctl(int d, int request,...); @@ -355,4 +356,5 @@ AC_TRY_COMPILE( [ + #include <unistd.h> #include <sys/ioctl.h> int ioctl(int d, unsigned long request,...); @@ -363,4 +365,5 @@ AC_TRY_COMPILE( [ + #include <unistd.h> #include <sys/ioctl.h> int ioctl(int d, unsigned long int request,...);