summaryrefslogtreecommitdiff
path: root/science/udunits/files/patch-lib-xml.c
blob: 01ca8725676e8da495cba6e09d13c3b9444227d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- lib/xml.c.orig	2020-12-07 18:37:03 UTC
+++ lib/xml.c
@@ -38,7 +38,7 @@
 #endif
 #include <sys/stat.h>
 #include <sys/types.h>
-#if defined(__linux__)
+#if defined(__linux__) || defined(__FreeBSD__)
 #include <dlfcn.h>
 #elif defined(__APPLE__)
 #define _DARWIN_C_SOURCE
@@ -2137,7 +2137,7 @@ default_udunits2_xml_path()
     if (absXmlPathname[0] == 0) {
         const char* prefix = NULL; // Installation directory
 
-#       if defined(__APPLE__) || defined(__linux__)
+#       if defined(__APPLE__) || defined(__linux__) || defined(__FreeBSD__)
             Dl_info     info;
             const char  sep = '/'; // Pathname component separator
             char        buf[PATH_MAX];