$OpenBSD: patch-source3_wscript,v 1.11 2019/12/19 02:57:28 jca Exp $

- use more generic check for OpenBSD.
- avoid nested function error with clang

Index: source3/wscript
--- source3/wscript.orig
+++ source3/wscript
@@ -90,7 +90,7 @@ def configure(conf):
         conf.ADD_CFLAGS('-DDEVELOPER -DDEBUG_PASSWORD')
         conf.env.developer = True
 
-    if sys.platform != 'openbsd5':
+    if not sys.platform.startswith('openbsd'):
         conf.ADD_LDFLAGS("-Wl,--export-dynamic", testflags=True)
 
     # We crash without vfs_default
@@ -1521,6 +1521,7 @@ main() {
 
     conf.CHECK_CODE('void seekdir(DIR *d, long loc) { return; }',
                     'SEEKDIR_RETURNS_VOID',
+                    addmain=False,
                     headers='sys/types.h dirent.h',
                     msg='Checking whether seekdir returns void')
 
