fixes the build on armv7 (and very likely on aarch64 as well), OK

On 2018 Apr 25 (Wed) at 22:02:45 +0200 (+0200), Markus Hennecke wrote:
:Since clang defines __GNUC__ and __regparm__ is not valid on arm the wrong 
:defines are used in attributes.h. As far as I understood __regparm__ 
:is only valid on x86, so make sure this is only used on x86.
:The same error shows up on aarch64, it should be fixed there too. I can't 
:test it there.
:
:I can't add the patches directory with a read only CVS server, so here is 
:the patch inline:
: 
:$OpenBSD$
:
:Index: src/attributes.h
:--- src/attributes.h.orig
:+++ src/attributes.h
:@@ -67,7 +67,7 @@
: 
: #define attribute_inline __inline__
: 
:-#if GNUC_MINIMUM(2,7) /* doesn't work reliable before, IIRC */
:+#if GNUC_MINIMUM(2,7) && (defined(__amd64__) || defined(__i386__))
: # define attribute_regparm(x) __attribute__((__regparm__((x))))
: #else
: # define attribute_regparm(x)
:

-- 
Bore, n.:
        A guy who wraps up a two-minute idea in a two-hour vocabulary.
                -- Walter Winchell

Reply via email to