Initial commit
[kopensolaris-gnu/patches.git] / nas-1.9.1.diff
1 diff -uraN nas-1.9.1.orig/server/dda/sun/audbri.c nas-1.9.1/server/dda/sun/audbri.c
2 --- nas-1.9.1.orig/server/dda/sun/audbri.c      2007-06-16 15:03:21.000000000 -0400
3 +++ nas-1.9.1/server/dda/sun/audbri.c   2008-09-27 10:17:46.225276475 -0400
4 @@ -26,7 +26,7 @@
5  #include "os.h"                 /* for xalloc/xfree and NULL */
6  #include <fcntl.h>
7  #include <stropts.h>
8 -#ifndef SVR4
9 +#if !defined(SVR4) && !defined(__OpenSolaris_kernel__)
10  #include <sun/audioio.h>
11  #else /* SVR4 */
12  #include <sys/audioio.h>
13 @@ -47,7 +47,7 @@
14  }
15  #else /* AUDIO_GETDEV */
16  
17 -#ifndef SVR4
18 +#if !defined(SVR4) && !defined(__OpenSolaris_kernel__)
19  typedef int audio_device_t;
20  #define IS_DBRI(_t)                                                           \
21      ((_t) == AUDIO_DEV_SPEAKERBOX || (_t) == AUDIO_DEV_CODEC)
22 diff -uraN nas-1.9.1.orig/server/dda/sun/ausun.c nas-1.9.1/server/dda/sun/ausun.c
23 --- nas-1.9.1.orig/server/dda/sun/ausun.c       2007-06-16 15:03:21.000000000 -0400
24 +++ nas-1.9.1/server/dda/sun/ausun.c    2008-09-27 10:17:48.165513608 -0400
25 @@ -28,7 +28,7 @@
26  #include "os.h"                 /* for xalloc/xfree and NULL */
27  #include <fcntl.h>
28  #include <stropts.h>
29 -#ifndef SVR4
30 +#if !defined(SVR4) && !defined(__OpenSolaris_kernel__)
31  #include <sun/audioio.h>
32  #else /* SVR4 */
33  #include <sys/audioio.h>
34 diff -uraN nas-1.9.1.orig/server/dda/sun/ausuni.c nas-1.9.1/server/dda/sun/ausuni.c
35 --- nas-1.9.1.orig/server/dda/sun/ausuni.c      2007-06-16 15:03:21.000000000 -0400
36 +++ nas-1.9.1/server/dda/sun/ausuni.c   2008-09-27 10:17:49.784229303 -0400
37 @@ -84,7 +84,7 @@
38  #include <fcntl.h>
39  #include <stropts.h>
40  #include <string.h>             /* for strcmp */
41 -#ifndef SVR4
42 +#if !defined(SVR4) && !defined(__OpenSolaris_kernel__)
43  #include <sun/audioio.h>
44  #else /* SVR4 */
45  #include <sys/audioio.h>
46 @@ -101,7 +101,7 @@
47  #ifndef AUDIO_INTERNAL_CD_IN
48  #define AUDIO_INTERNAL_CD_IN 0x04
49  #endif /* not defined AUDIO_INTERNAL_CD_IN */
50 -#ifndef SVR4
51 +#if !defined(SVR4) && !defined(__OpenSolaris_kernel__)
52  #ifndef AUDIO_DEV_CS4231
53  #define AUDIO_DEV_CS4231 5
54  #endif /* not defined AUDIO_DEV_CS4231 */
55 @@ -132,7 +132,7 @@
56  
57  extern int errno;
58  
59 -#ifndef SVR4
60 +#if !defined(SVR4) && !defined(__OpenSolaris_kernel__)
61  typedef int audio_device_t;
62  #define IS_AMD(_t)              ((_t) == AUDIO_DEV_AMD)
63  #define IS_CS4231(_t)           ((_t) == AUDIO_DEV_CS4231)
64 diff -uraN nas-1.9.1.orig/server/dia/auservertype.h nas-1.9.1/server/dia/auservertype.h
65 --- nas-1.9.1.orig/server/dia/auservertype.h    2007-06-16 15:03:22.000000000 -0400
66 +++ nas-1.9.1/server/dia/auservertype.h 2008-09-27 10:17:00.713722110 -0400
67 @@ -6,7 +6,7 @@
68  #ifndef _AUSERVERTYPE_H_
69  #define _AUSERVERTYPE_H_
70  
71 -#ifdef sun
72 +#if defined(sun) || defined(__OpenSolaris_kernel__)
73  # define SUN_SERVER
74  #endif /* sun */
75  
76 diff -uraN nas-1.9.1.orig/server/Imakefile nas-1.9.1/server/Imakefile
77 --- nas-1.9.1.orig/server/Imakefile     2008-09-27 10:16:30.000000000 -0400
78 +++ nas-1.9.1/server/Imakefile  2008-09-27 10:17:00.714000686 -0400
79 @@ -77,7 +77,7 @@
80   *               ALL definitions, add one for each server                   *
81   *****************************************************************************/
82  
83 -#ifdef SunArchitecture
84 +#if defined(SunArchitecture) || defined(__OpenSolaris_kernel__)
85  #define CanBuildAuServer       YES
86  ALL1 = nasd
87  #define BuildSunServer
88 diff -uraN nas-1.9.1.orig/server/os/access.c nas-1.9.1/server/os/access.c
89 --- nas-1.9.1.orig/server/os/access.c   2008-09-27 10:16:30.000000000 -0400
90 +++ nas-1.9.1/server/os/access.c        2008-09-27 10:17:00.714446336 -0400
91 @@ -306,7 +306,7 @@
92  #if (!defined(SVR4) && !defined(SYSV386) && !(defined (hpux) && ! defined (HAS_IFREQ))) || defined(USE_FALLBACK_DEFINESELF)
93  #ifndef _MINIX
94  
95 -#ifdef AF_LINK
96 +#if defined(AF_LINK) && !defined(__OpenSolaris_kernel__)
97  #define ifr_size(p) ((p).sa_len > sizeof(p) ? (p).sa_len : sizeof(p))
98  #else
99  #define ifr_size(p) (sizeof(p))