--- ./extra/libedit/libedit-20190324-3.1/src/chartype.h_orig	2020-07-20 01:02:22 +0000
+++ ./extra/libedit/libedit-20190324-3.1/src/chartype.h	2020-07-20 01:05:30 +0000
@@ -38,6 +38,7 @@
 	!(defined(__APPLE__) && defined(__MACH__)) && \
 	!defined(__OpenBSD__) && \
 	!defined(__FreeBSD__) && \
+	!defined(_AIX) && \
 	!defined(__DragonFly__)
 #ifndef __STDC_ISO_10646__
 /* In many places it is assumed that the first 127 code points are ASCII
--- ./extra/libedit/libedit-20190324-3.1/src/el.c_orig	2020-07-20 06:34:10 +0000
+++ ./extra/libedit/libedit-20190324-3.1/src/el.c	2020-07-20 07:13:18 +0000
@@ -70,19 +70,11 @@
 #			include <unistd.h>
 #		else
 #			undef issetugid
-#			define issetugid() 1
 #		endif
 #	endif
 #endif
 
-#ifndef HAVE_SECURE_GETENV
-char *secure_getenv(char const *name)
-{
-	if (issetugid())
-		return 0;
-	return getenv(name);
-}
-#endif
+
 
 #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) && \
     defined(HAVE_GETGID) && defined(HAVE_GETEGID)
@@ -96,6 +88,16 @@
 
 #endif
 
+#ifndef HAVE_SECURE_GETENV
+char *secure_getenv(char const *name)
+{
+    if (issetugid())
+        return 0;
+    return getenv(name);
+}
+#endif
+
+
 /* el_init():
  *	Initialize editline and set default parameters.
  */
