- Link against libc to find strlen, etc.
- Recognise OpenBSD to pick up efivar

Index: meson.build
--- meson.build.orig
+++ meson.build
@@ -131,7 +131,10 @@ endif
 
 # enable full RELRO where possible
 # FIXME: until https://github.com/mesonbuild/meson/issues/1140 is fixed
-global_link_args = []
+global_link_args = [
+  '-lc',
+  '-L/usr/local/lib',
+]
 test_link_args = [
   '-Wl,-z,relro',
   '-Wl,-z,defs',
@@ -317,7 +320,7 @@ if get_option('default_library') != 'static'
   if host_machine.system() == 'windows'
     platform_deps += cc.find_library('shlwapi')
   endif
-  if host_machine.system() == 'freebsd'
+  if host_machine.system() in ['freebsd', 'openbsd']
     platform_deps += dependency('efivar')
   endif
 endif
@@ -426,7 +429,7 @@ if cc.has_header_symbol('sys/mount.h', 'BLKSSZGET')
   conf.set('HAVE_BLKSSZGET', '1')
 endif
 
-if host_machine.system() == 'freebsd'
+if host_machine.system() in ['freebsd', 'openbsd']
   if cc.has_type('struct efi_esrt_entry_v1', prefix: '#include <sys/types.h>\n#include <sys/efiio.h>')
     conf.set('HAVE_FREEBSD_ESRT', '1')
   endif
