--- ./lib/util/gpfswrap.c_orig	2021-06-04 16:55:54 +0000
+++ ./lib/util/gpfswrap.c	2021-06-04 16:56:53 +0000
@@ -61,7 +61,11 @@
 		return 0;
 	}
 
+#ifdef _AIX
+	l = dlopen("libgpfs.a(shr.o)", RTLD_MEMBER | RTLD_LAZY);
+#else
 	l = dlopen("libgpfs.so", RTLD_LAZY);
+#endif
 	if (l == NULL) {
 		return -1;
 	}
--- ./source3/modules/vfs_gpfs.c_orig	2021-06-04 16:39:24 +0000
+++ ./source3/modules/vfs_gpfs.c	2021-06-04 16:55:25 +0000
@@ -38,6 +38,8 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_VFS
 
+#define AT_SYMLINK_NOFOLLOW 1
+
 #ifndef GPFS_GETACL_NATIVE
 #define GPFS_GETACL_NATIVE 0x00000004
 #endif
@@ -241,16 +243,20 @@
 	struct gpfs_config_data *config;
 	int ret=0;
 
+#ifndef _AIX
 	START_PROFILE(syscall_linux_setlease);
+#endif
 
 	SMB_VFS_HANDLE_GET_DATA(handle, config,
 				struct gpfs_config_data,
 				return -1);
 
+#ifndef _AIX
 	ret = linux_set_lease_sighandler(fsp_get_io_fd(fsp));
 	if (ret == -1) {
 		goto failure;
 	}
+#endif
 
 	if (config->leases) {
 		int gpfs_lease_type = lease_type_to_gpfs(leasetype);
@@ -272,8 +278,10 @@
 		}
 	}
 
+#ifndef _AIX
 failure:
 	END_PROFILE(syscall_linux_setlease);
+#endif
 
 	return ret;
 }
