Commit 5392f0c1a44f5898eec4ff6ab0866b2f5c917855

Guillem Jover 2024-02-12T02:55:08

build: Add support for Solaris

diff --git a/configure.ac b/configure.ac
index a761d9c..c00aa0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -249,6 +249,51 @@ AS_CASE([$host_os],
     abi_vis=no
     abi_wcsl=no
   ],
+  [solaris2*], [
+    abi_accmode=yes
+    abi_arc4random=no
+    abi_arc4random_stir=no
+    abi_bsd_getopt=yes
+    abi_closefrom=no
+    abi_err=no
+    abi_errc=yes
+    abi_expand_number=yes
+    abi_explicit_bzero=yes
+    abi_fgetln=yes
+    abi_flopen=yes
+    abi_fmtcheck=no
+    abi_fpurge=yes
+    abi_freezero=yes
+    abi_funopen=no
+    abi_getbsize=yes
+    abi_getpeereid=yes
+    abi_humanize_number=yes
+    abi_id_from_name=yes
+    abi_inet_net_pton=yes
+    # On libmd.
+    abi_md5=no
+    abi_name_from_id=yes
+    abi_nlist=no
+    abi_pidfile=yes
+    abi_proctitle=yes
+    abi_progname=no
+    abi_readpassphrase=yes
+    abi_reallocarray=yes
+    abi_reallocf=no
+    abi_recallocarray=yes
+    abi_stringlist=yes
+    abi_sort=yes
+    abi_strl=no
+    abi_strmode=yes
+    abi_strnstr=no
+    abi_strtonum=no
+    abi_strtox=yes
+    abi_timeconv=yes
+    # On libmd.
+    abi_transparent_libmd=no
+    abi_vis=yes
+    abi_wcsl=yes
+  ],
   [mingw*], [
     is_windows=yes
   ],
diff --git a/src/local-link.h b/src/local-link.h
index d6bd77f..dd67c70 100644
--- a/src/local-link.h
+++ b/src/local-link.h
@@ -47,7 +47,7 @@
 	extern __typeof__(symbol) alias __attribute__((__alias__(#symbol)))
 #endif
 
-#ifdef __ELF__
+#if defined(__ELF__) && !defined(__sun)
 #  if __has_attribute(symver)
 /* The symver attribute is supported since gcc 10.x. */
 #define libbsd_symver_default(symbol, alias, version) \