File nethack-decl.patch of Package nethack
Index: NetHack-3.6.7/include/system.h =================================================================== --- NetHack-3.6.7.orig/include/system.h +++ NetHack-3.6.7/include/system.h @@ -109,7 +109,9 @@ E void srand48(); #if !defined(BSD) || defined(ultrix) /* real BSD wants all these to return int */ #ifndef MICRO +# ifndef __GLIBC__ E void FDECL(exit, (int)); +# endif #endif /* MICRO */ /* compensate for some CSet/2 bogosities */ #if defined(OS2_CSET2) && defined(OS2_CSET2_VER_2) @@ -128,7 +130,9 @@ E void FDECL(exit, (int)); #if defined(__STDC__) || !defined(FLEX_SCANNER) #ifndef OS2_CSET2 #ifndef MONITOR_HEAP +# ifndef __GLIBC__ E void FDECL(free, (genericptr_t)); +# endif #endif #endif #endif @@ -362,27 +366,35 @@ E char *FDECL(memset, (char *, int, int) E void sleep(); #endif #if defined(ULTRIX) || defined(SYSV) +# ifndef __GLIBC__ E unsigned sleep(); +# endif #endif #if defined(HPUX) E unsigned int FDECL(sleep, (unsigned int)); #endif #endif #ifdef VMS +# ifndef __GLIBC__ E int FDECL(sleep, (unsigned)); +# endif #endif +#ifndef __GLIBC__ E char *FDECL(getenv, (const char *)); E char *getlogin(); +#endif #if defined(HPUX) && !defined(_POSIX_SOURCE) E long NDECL(getuid); E long NDECL(getgid); E long NDECL(getpid); #else #ifdef POSIX_TYPES +# ifndef __GLIBC__ E pid_t NDECL(getpid); E uid_t NDECL(getuid); E gid_t NDECL(getgid); +# endif #ifdef VMS E pid_t NDECL(getppid); #endif