--- portmap_4/Makefile.pie	2003-10-28 20:18:32.000000000 -0800
+++ portmap_4/Makefile	2003-10-28 20:18:32.000000000 -0800
@@ -74,8 +74,11 @@
 
 all:	portmap pmap_dump pmap_set
 
+$(OBJECTS): %.o: %.c
+	$(CC) $(CFLAGS) -fpie -c $<
+
 portmap: $(OBJECTS) 
-	$(CC) $(CFLAGS) -o $@ $(OBJECTS) $(LIBS)
+	$(CC) $(CFLAGS) -o $@ -pie $(OBJECTS) $(LIBS)
 
 pmap_dump: pmap_dump.c
 	$(CC) $(CFLAGS) -o $@ $? $(LIBS)
--- portmap_4/pmap_check.h.pie	2003-10-28 20:26:34.000000000 -0800
+++ portmap_4/pmap_check.h	2003-10-28 20:26:49.000000000 -0800
@@ -6,6 +6,6 @@
 extern int check_setunset();
 extern int check_privileged_port();
 extern int check_callit();
-extern int verboselog;
-extern int allow_severity;
-extern int deny_severity;
+extern int verboselog __attribute__ ((visibility ("hidden")));
+extern int allow_severity __attribute__ ((visibility ("hidden")));
+extern int deny_severity __attribute__ ((visibility ("hidden")));
--- portmap_4/pmap_check.c.pie	2003-10-28 20:27:38.000000000 -0800
+++ portmap_4/pmap_check.c	2003-10-28 20:27:40.000000000 -0800
@@ -63,9 +63,9 @@
 
 static void logit();
 static void toggle_verboselog();
-int     verboselog = 0;
-int     allow_severity = LOG_INFO;
-int     deny_severity = LOG_WARNING;
+int     verboselog __attribute ((visibility ("hidden"))) = 0;
+int     allow_severity __attribute ((visibility ("hidden"))) = LOG_INFO;
+int     deny_severity __attribute ((visibility ("hidden"))) = LOG_WARNING;
 
 /* A handful of macros for "readability". */
 
