[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnubg] [patch] gnubg-0.14.1: fixsound.c compile on NetBSD/sparc-1.5
From: |
Adrian Bunk |
Subject: |
[Bug-gnubg] [patch] gnubg-0.14.1: fixsound.c compile on NetBSD/sparc-1.5 |
Date: |
Thu, 22 Jan 2004 03:16:52 +0100 |
User-agent: |
Mutt/1.4.1i |
I got the following compile error when trying to compile gnubg-0.14.1 on
NetBSD/sparc-1.5:
<-- snip -->
...
gcc -DHAVE_CONFIG_H -I. -I. -I. -I./lib -I/usr/local/include/libxml2
-I./intl -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include/freetype2
-I/usr/local/include -I/usr/local/include/python2.3
-I/usr/local/include/glib-2.0
-I/usr/local/lib/glib-2.0/include -I/usr/local/include/gtk-2.0
-I/usr/local/lib/gtk-2.0/include -I/usr/local/include/atk-1.0
-I/usr/local/include/pango-1.0
-I/usr/local/include -I/usr/local/include/freetype2 -I/usr/X11R6/include
-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
-I/usr/local/include
-I/usr/X11R6/include/artsc -I/usr/local/include -I/usr/local/include -O2
-mcpu=v8 -c `test -f 'sound.c' || echo './'`sound.c
In file included from sound.c:31:
/usr/include/sys/audioio.h:44: parse error before `u_int'
...
make[2]: *** [sound.o] Error 1
make[2]: Leaving directory `/aux/adrian/build/gnubg-0.14.1'
<-- snip -->
Lines 43-45 in /usr/include/sys/audioio.h are:
<-- snip -->
...
struct audio_prinfo {
u_int sample_rate; /* sample rate in bit/s */
u_int channels; /* number of channels, usually 1 or 2 */
...
<-- snip -->
u_int is typedef'ed in sys/types.h .
The following patch fixed the compilation:
--- sound.c.old 2004-01-22 03:11:33.000000000 +0100
+++ sound.c 2004-01-22 03:11:55.000000000 +0100
@@ -27,6 +27,7 @@
#include <config.h>
#endif
#include <assert.h>
+#include <sys/types.h>
#if HAVE_SYS_AUDIOIO_H
#include <sys/audioio.h>
#endif
@@ -44,7 +45,6 @@
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
-#include <sys/types.h>
#include <unistd.h>
#if HAVE_ESD
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-gnubg] [patch] gnubg-0.14.1: fixsound.c compile on NetBSD/sparc-1.5,
Adrian Bunk <=