[packages/openssh] add limits.h hack for ac in openbsd-compat

Jakub Bogusz qboosh at pld-linux.org
Tue May 13 18:02:02 CEST 2014


On Tue, May 13, 2014 at 06:42:51PM +0300, Elan Ruusamäe wrote:
> On 13.05.2014 18:16, Jakub Bogusz wrote:
> >On Tue, May 13, 2014 at 05:42:28PM +0300, Elan Ruusamäe wrote:
> >>i would appreciate if somebody can do cleaner fix for this hack
> >>>+--- openssh-6.6p1/openbsd-compat/fmt_scaled.c~	2014-05-13
> >>>17:23:35.999776940 +0300
> >>>++++ openssh-6.6p1/openbsd-compat/fmt_scaled.c	2014-05-13
> >>>17:23:40.989697403 +0300
> >>>+@@ -49,6 +49,11 @@
> >>>+ #include <ctype.h>
> >>>+ #include <limits.h>
> >>>+
> >>>++#if !defined(LLONG_MAX)
> >>>++#   define LLONG_MAX	9223372036854775807LL
> >>>++#   define LLONG_MIN	(-LLONG_MAX - 1LL)
> >>>++#endif
> >>>++
> >>>+ typedef enum {
> >>>+ 	NONE = 0, KILO = 1, MEGA = 2, GIGA = 3, TERA = 4, PETA = 5, EXA = 6
> >>>+ } unit_type;
> >Have you tried -std=c99 (to CFLAGS)?

Or maybe -std=gnu99?

> >LLONG_ constants are available for:
> >
> >#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
> >
> >
> 
> that will make it fail in other areas:
> 
> ccache amd64-pld-linux-gcc -O2 -gdwarf-2 -g2  -Wall -Wpointer-arith 
> -Wuninitialized -Wsign-compare -Wformat-security -fno-strict-aliasing 
> -D_FORTIFY_SOURCE=2 -ftrapv -fno-builtin-memset  -I. -I.. -I. -I./..  
> -DCHROOT -std=c99 -DLDAP_DEPRECATED -I/usr/include  -I/usr/include  
> -DHAVE_CONFIG_H -c bsd-closefrom.c
> In file included from ../includes.h:171,
>                  from bsd-asprintf.c:20:
> ../defines.h:374:1: warning: "NFDBITS" redefined
> In file included from /usr/include/sys/types.h:216,
>                  from ../includes.h:25,
>                  from bsd-asprintf.c:20:
> /usr/include/sys/select.h:88:1: warning: this is the location of the 
> previous definition
> In file included from ../includes.h:171,
>                  from bsd-asprintf.c:20:
> ../defines.h:188: warning: redefinition of `u_int'
> /usr/include/sys/types.h:37: warning: `u_int' previously declared here
> ../defines.h:288: warning: redefinition of `u_char'
> /usr/include/sys/types.h:35: warning: `u_char' previously declared here
> ../defines.h:370: error: conflicting types for `fd_mask'
> /usr/include/sys/select.h:85: error: previous declaration of `fd_mask'
> In file included from ../openbsd-compat/openbsd-compat.h:258,
>                  from ../includes.h:174,
>                  from bsd-asprintf.c:20:
> ../openbsd-compat/fake-rfc2553.h:137: error: redefinition of `struct 
> addrinfo'

Why there are redefinitions?


-- 
Jakub Bogusz    http://qboosh.pl/


More information about the pld-devel-en mailing list