summaryrefslogtreecommitdiff
path: root/games/foobillard/patches/patch-aa
blob: 883d03de4f7de3a37a904cf20a17f64865c73390 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
$NetBSD: patch-aa,v 1.3 2006/03/28 19:37:43 joerg Exp $

--- src/billard3d.c.orig	2004-04-24 01:20:49.000000000 +0000
+++ src/billard3d.c
@@ -24,7 +24,12 @@
 #include <string.h>
 #include <math.h>
 #include <unistd.h>
+#include <sys/param.h>
+#if (defined(__FreeBSD__) && __FreeBSD_version >= 500000) || defined(__DragonFly__) || defined(__NetBSD__)
+#include <sys/endian.h>
+#else
 #include <endian.h>
+#endif
 
 #ifndef USE_SDL
 #include <GL/glut.h>
@@ -5000,7 +5005,7 @@ int main( int argc, char *argv[] )
 
    /* config file */
    load_config( &confv, &confc, argv, argc );
-   while( ( act_option = getopt_long_only(confc, confv, "+", long_options, &option_index) ) >= 0){
+   while( ( act_option = getopt_long(confc, confv, "+", long_options, &option_index) ) >= 0){
        DPRINTF("processing option %d=%s\n",act_option,optarg);
        process_option(act_option);
    }
@@ -5098,7 +5103,7 @@ int main( int argc, char *argv[] )
        fread( &ball_ball_snd.data[SOUND_NULLOFFS*2], 1, ball_ball_snd.len-SOUND_NULLOFFS*2*2 , f );
        fclose(f);
 
-#if __BYTE_ORDER == __BIG_ENDIAN
+#if _BYTE_ORDER == _BIG_ENDIAN
        {
           char *snd=ball_ball_snd.data;
           for(i=0;i<ball_ball_snd.len;i+=2)