Control: tag -1 + patch

On Sun, 05 Oct 2014 16:15:22 +0200, gregor herrmann wrote:

> dh_auto_build
> make[2]: Entering directory '/«PKGBUILDDIR»'
> make[3]: Entering directory '/«PKGBUILDDIR»/src'
> OS is GNU/KFREEBSD, arch is x86_64
> CC tun.c
> cc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -std=c99 
> -c -D`echo GNU/kFreeBSD | tr "a-z" "A-Z"` -pedantic `sh osflags GNU/kFreeBSD 
> cflags` -D_FORTIFY_SOURCE=2 tun.c -o tun.o
> <command-line>:0:4: warning: ISO C99 requires whitespace after the macro name
> CC dns.c
> cc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -std=c99 
> -c -D`echo GNU/kFreeBSD | tr "a-z" "A-Z"` -pedantic `sh osflags GNU/kFreeBSD 
> cflags` -D_FORTIFY_SOURCE=2 dns.c -o dns.o
> <command-line>:0:4: warning: ISO C99 requires whitespace after the macro name
> In file included from dns.c:33:0:
> /usr/include/arpa/nameser.h:115:8: error: unknown type name 'u_char'
>   const u_char *_msg, *_eom;
>         ^
> [... and so on ...]

Ok, with the following patch it builds:

#v+
% cat debian/patches/kfreebsd.patch
--- a/src/osflags
+++ b/src/osflags
@@ -38,6 +38,9 @@
            [ -e /usr/include/systemd/sd-daemon.h ] && FLAGS="$FLAGS 
-DHAVE_SYSTEMD";
            echo $FLAGS;
        ;;
+       GNU/kFreeBSD)
+           echo '-D_GNU_SOURCE'
+       ;;
    esac
 ;;
 *)
#v-

(I'm attaching the original src/osflags for reference).

Does this look ok for kFreeBSD?


Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Nguyên Lê: Stranieri
#!/bin/sh

case $2 in
link)

        case $1 in
                SunOS | solaris)
                        echo '-lsocket -lnsl';
                ;;
                BeOS)
                        echo '-lsocket -lbind -lbsd';
                ;;
                Haiku)
                        echo '-lnetwork';
                ;;
                windows32)
                        echo '-lws2_32 -liphlpapi';
                ;;
                Linux)
                        FLAGS="";
                        [ -e /usr/include/selinux/selinux.h ] && FLAGS="$FLAGS 
-lselinux";
                        [ -e /usr/include/systemd/sd-daemon.h ] && 
FLAGS="$FLAGS -lsystemd-daemon";
                        echo $FLAGS;
                ;;
        esac
        ;;
cflags)
        case $1 in
                windows32)
                        echo '-DWINVER=0x0501';
                ;;
                BeOS)
                        echo '-Dsocklen_t=int';
                ;;
                Linux)
                        FLAGS="-D_GNU_SOURCE"
                        [ -e /usr/include/selinux/selinux.h ] && FLAGS="$FLAGS 
-DHAVE_SETCON";
                        [ -e /usr/include/systemd/sd-daemon.h ] && 
FLAGS="$FLAGS -DHAVE_SYSTEMD";
                        echo $FLAGS;
                ;;
        esac
;;
*)
;;
esac

Attachment: signature.asc
Description: Digital Signature

Reply via email to