From 9f2d7146202c157e85d957e4980f6b3e58c5e9cc Mon Sep 17 00:00:00 2001
From: "Marc G. Fournier" <scrappy@hub.org>
Date: Wed, 7 May 1997 03:12:46 +0000
Subject: [PATCH] From: "Paul M. Aoki" <aoki@CS.Berkeley.EDU> Subject:
 [PATCHES] port patch: ultrix4

ultrix4 doesn't compile without this.  this also fixes a problem
with dynamic loading (ultrix relocatable objects must be loaded
with -G 0).
---
 src/include/port/ultrix4.h     | 7 ++++++-
 src/makefiles/Makefile.ultrix4 | 7 +++++++
 src/template/ultrix4           | 2 +-
 3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/include/port/ultrix4.h b/src/include/port/ultrix4.h
index 55aa074f3ad..c050965d5b0 100644
--- a/src/include/port/ultrix4.h
+++ b/src/include/port/ultrix4.h
@@ -1,6 +1,10 @@
 #  define USE_POSIX_TIME
 #  define NEED_STRDUP
 
+#ifndef		BYTE_ORDER
+#define		BYTE_ORDER	LITTLE_ENDIAN
+#endif
+
 /*
  * Except for those system calls and library functions that are either
  * - covered by the C standard library and Posix.1
@@ -54,5 +58,6 @@ extern int gettimeofday(struct timeval *, struct timezone *);
 extern int fsync(int);
 extern int ftruncate(int, off_t);
 
-/* End of ultrix4.h */
+extern char *crypt(char *, char *);
 
+/* End of ultrix4.h */
diff --git a/src/makefiles/Makefile.ultrix4 b/src/makefiles/Makefile.ultrix4
index cf46e90819b..b56aee6c686 100644
--- a/src/makefiles/Makefile.ultrix4
+++ b/src/makefiles/Makefile.ultrix4
@@ -1,2 +1,9 @@
 # install creates intermediate directories
 NO_BEFOREINSTL= true
+SHELL=/bin/sh5
+
+#
+# "-G 0" works for both DEC cc and GNU cc.
+#
+%.so: %.c
+	$(CC) -c -G 0 $(CFLAGS) -o $@ $<
diff --git a/src/template/ultrix4 b/src/template/ultrix4
index 038c7b1ef00..237426646f7 100644
--- a/src/template/ultrix4
+++ b/src/template/ultrix4
@@ -5,6 +5,6 @@ ALL:
 SRCH_INC:
 SRCH_LIB:
 USE_LOCALE:no
-DLSUFFIX:.o
+DLSUFFIX:.so
 YFLAGS:-d
 YACC:
-- 
GitLab