]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libphobos: Fix struct layout of addrinfo on sparc-*-solaris*
authorIain Buclaw <ibuclaw@gdcproject.org>
Mon, 27 Apr 2020 21:51:50 +0000 (23:51 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Mon, 27 Apr 2020 21:59:01 +0000 (23:59 +0200)
Comparing the struct addrinfo declarations in <netdb.h>

    struct addrinfo {
...
    #ifdef __sparcv9
        int _ai_pad;
    #endif /* __sparcv9 */
...
    };

In the extern(C) core.sys bindings, there's a mismatch here; the system
version has no _aid_pad member on 32-bit SPARC.

libphobos/ChangeLog:

PR d/90718
* libdruntime/core/sys/posix/netdb.d (Solaris): Include _ai_pad member
in struct addrinfo only when targeting SPARC64.

libphobos/ChangeLog
libphobos/libdruntime/core/sys/posix/netdb.d

index af379c8c4c5d3ec05a33fc4700be00405b5c5205..67d02036def51d1f588316529d533d795598030c 100644 (file)
@@ -1,3 +1,9 @@
+2020-04-27  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+       PR d/90718
+       * libdruntime/core/sys/posix/netdb.d (Solaris): Include _ai_pad member
+       in struct addrinfo only when targeting SPARC64.
+
 2020-04-27  Iain Buclaw  <ibuclaw@gdcproject.org>
 
        PR d/90719
index 327387f68ea303856fdf0eee61e19bf3cad7cdd9..f1251839b164551c39056aab18890d89ff075b3f 100644 (file)
@@ -743,9 +743,7 @@ else version (Solaris)
         int ai_socktype;
         int ai_protocol;
 
-        version (SPARC)
-            int _ai_pad;
-        else version (SPARC64)
+        version (SPARC64)
             int _ai_pad;
 
         socklen_t ai_addrlen;