# https://github.com/FranklinChen/hugs98-plus-Sep2006/commit/9f18703ebdb2cc44fcfafcd71399a2fc23774ca3

--- packages/network/configure.ac.orig	2006-09-21 05:28:56.000000000 +0700
+++ packages/network/configure.ac	2022-09-20 23:46:53.000000000 +0700
@@ -11,7 +11,7 @@
 
 dnl ** check for specific header (.h) files that we are interested in
 AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h sys/types.h unistd.h winsock.h])
-AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h netinet/tcp.h sys/socket.h sys/uio.h sys/un.h])
+AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h netinet/tcp.h sys/socket.h sys/uio.h sys/un.h sys/ucred.h])
 
 AC_CHECK_FUNCS([readlink symlink])
 
--- packages/network/configure.orig	2006-09-21 05:33:37.000000000 +0700
+++ packages/network/configure	2022-09-20 23:48:14.000000000 +0700
@@ -3810,7 +3810,7 @@
 
 
 
-for ac_header in arpa/inet.h netdb.h netinet/in.h netinet/tcp.h sys/socket.h sys/uio.h sys/un.h
+for ac_header in arpa/inet.h netdb.h netinet/in.h netinet/tcp.h sys/socket.h sys/uio.h sys/un.h sys/ucred.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then

--- packages/network/include/HsNet.h.orig	2022-09-20 23:37:05.000000000 +0700
+++ packages/network/include/HsNet.h	2022-09-20 23:45:44.000000000 +0700
@@ -20,9 +20,9 @@
 # if defined(_MSC_VER)
 #  define INLINE extern __inline
 # elif defined(__GNUC__)
-#  define INLINE extern inline
+#  define INLINE static inline
 # else
-#  define INLINE inline
+#  define INLINE static inline
 # endif
 #endif
 
@@ -89,6 +89,10 @@
 #endif
 #endif
 
+#ifdef HAVE_SYS_UCRED_H
+#include <sys/ucred.h>
+#endif
+
 extern int
 sendFd(int sock, int outfd);
 
--- packages/unix/include/HsUnix.h.org	2022-08-08 01:49:33.000000000 +0700
+++ packages/unix/include/HsUnix.h	2022-09-20 23:41:22.000000000 +0700
@@ -89,9 +89,9 @@
 
 #ifndef INLINE
 # if defined(__GNUC__)
-#  define INLINE extern inline
+#  define INLINE static inline
 # else
-#  define INLINE inline
+#  define INLINE static inline
 # endif
 #endif
 
--- packages/Win32/include/HsWin32.h.orig	2006-09-21 05:31:31.000000000 +0700
+++ packages/Win32/include/HsWin32.h	2022-09-20 23:49:07.000000000 +0700
@@ -7,7 +7,7 @@
 # if defined(_MSC_VER)
 #  define INLINE extern __inline
 # else
-#  define INLINE extern inline
+#  define INLINE static inline
 # endif
 #endif
 
--- packages/Win32/include/HsGDI.h.orig	2006-09-21 05:31:31.000000000 +0700
+++ packages/Win32/include/HsGDI.h	2022-09-20 23:49:52.000000000 +0700
@@ -7,7 +7,7 @@
 # if defined(_MSC_VER)
 #  define INLINE extern __inline
 # else
-#  define INLINE extern inline
+#  define INLINE static inline
 # endif
 #endif
 
--- libraries/tools/make_bootlib.orig	2006-05-20 04:36:17.000000000 +0700
+++ libraries/tools/make_bootlib	2022-09-20 23:51:57.000000000 +0700
@@ -65,7 +65,7 @@
 	cp "$1" $cpp_input
 
 	# gcc-3.3 on MacOS X 10.3 is reported to add #pragma
-	$cpp $cpp_flags $cpp_input | grep -v '^#' | cat -s
+	cpp -traditional-cpp -Wno-trigraphs $cpp_flags $cpp_input | grep -v '^#' | cat -s
 }
 
 # internal Hugs modules

--- packages/network/include/HsNetworkConfig.h.in.orig	2006-09-21 05:33:38.000000000 +0700
+++ packages/network/include/HsNetworkConfig.h.in	2022-09-20 23:43:56.000000000 +0700
@@ -69,6 +69,9 @@
 /* Define to 1 if you have the <sys/types.h> header file. */
 #undef HAVE_SYS_TYPES_H
 
+/* Define to 1 if you have the <sys/ucred.h> header file. */
+#undef HAVE_SYS_UCRED_H
+
 /* Define to 1 if you have the <sys/uio.h> header file. */
 #undef HAVE_SYS_UIO_H
 
