openwrtv4/tools
Alexandru Ardelean 00d1e6c75e firmware-utils: fix compilation on MacOS X
Looking into /usr/include/stdlib.h, there's a `devname()` function defined
under some #ifdef's which conflicts with the `static char *devname` definition
in `src/mkwrggimg.c`.

Defining `_ANSI_SOURCE` in the `src/mkwrggimg.c` file, omits that part of the
header.

Another more intrusive approach is to rename `devname` to something like
`g_devname` in `src/mkwrggimg.c`. But I think the `_ANSI_SOURCE` define should
be enough.

Compilation error is:

    src/mkwrggimg.c:64:14: error: redefinition of 'devname' as different kind of symbol
    static char *devname;
                 ^
    /usr/include/stdlib.h:286:7: note: previous definition is here
    char    *devname(dev_t, mode_t);
             ^
    src/mkwrggimg.c:147:12: error: non-object type 'char *(dev_t, mode_t)' (aka 'char *(int, unsigned short)') is not assignable
                            devname = optarg;
                            ~~~~~~~ ^
    src/mkwrggimg.c:192:6: warning: comparison of function 'devname' equal to a null pointer is always false [-Wtautological-pointer-compare]
            if (devname == NULL) {
                ^~~~~~~    ~~~~
    src/mkwrggimg.c:192:6: note: prefix with the address-of operator to silence this warning
            if (devname == NULL) {
                ^
                &
    src/mkwrggimg.c:251:27: warning: incompatible pointer types passing 'char *(dev_t, mode_t)' (aka 'char *(int, unsigned short)') to parameter of type 'const char *' [-Wincompatible-pointer-types]
            strncpy(header->devname, devname, sizeof(header->devname));
                                     ^~~~~~~
    /usr/include/secure/_string.h:119:34: note: expanded from macro 'strncpy'
      __builtin___strncpy_chk (dest, src, len, __darwin_obsz (dest))

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
[Jo-Philipp Wich: slightly reformat commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-10-31 12:39:09 +01:00
..
autoconf tools/autoconf: fix compile on musl hosts 2015-05-04 13:22:36 +00:00
automake automake: portability fixes 2015-03-24 13:13:01 +00:00
b43-tools source: Switch to xz for packages and tools where possible 2016-10-06 12:16:56 +02:00
bc bc: add download mirrors 2015-06-06 13:48:57 +00:00
bison tools/bison: update to 3.0.4 2015-11-03 12:00:04 +00:00
ccache ccache: disable assembler support, it breaks kernel initramfs images 2016-10-05 10:13:04 +02:00
cloog cloog: update to 0.18.1 2013-12-15 21:07:32 +00:00
cmake tools/cmake: update to 3.6.1 2016-08-15 15:32:37 +02:00
coreutils tools: build GNU date from coreutils on non-Linux systems 2016-08-23 11:56:13 +02:00
dosfstools dosfstools: fix autotools dependency 2016-10-12 12:22:38 +02:00
e2fsprogs tools/e2fsprogs: Update to 1.43.3 2016-10-04 11:50:47 +02:00
elftosb tools: remove static linking support 2015-02-06 00:00:43 +00:00
expat tools/expat: Update to 2.2.0 2016-10-04 11:50:47 +02:00
findutils tools/findutils: Update to 4.6.0 2016-03-10 19:11:51 +00:00
firmware-utils firmware-utils: fix compilation on MacOS X 2016-10-31 12:39:09 +01:00
flex tools/flex: update to 2.6.1 2016-03-16 09:26:51 +00:00
flock tools: flock: add NFSv4 compatibility 2016-08-11 10:50:10 +02:00
genext2fs tools: bring back genext2fs for apm821xx 2016-07-23 19:37:20 +02:00
gengetopt tools: gengetopt: Disable doc and tests builds 2015-05-22 22:33:41 +00:00
gmp tools/gmp: update to 6.1.1 2016-08-15 15:32:37 +02:00
include tools: host/include/getline.h: fix FreeBSD 8.0+ support 2015-05-08 12:09:26 +00:00
isl tools/isl: bump to 0.17.1 2016-07-15 14:17:16 +02:00
kernel2minor tools: add kernel2minor utility for Mikrotik devices 2016-07-05 22:59:14 +02:00
libelf build: add the + token to any commands that can pass through the jobserver, fixes parallel build on some systems 2012-09-23 09:50:01 +00:00
libressl tools/libressl: Update to 2.5.0 and use mirrors 2016-10-15 11:36:51 +02:00
libtool source: Switch to xz for packages and tools where possible 2016-10-06 12:16:56 +02:00
lzma tools: lzma: reduce copyright noise 2016-08-04 18:19:46 +02:00
lzma-old tools/lzma-old fix compile issues (patch from #10253) 2011-10-21 12:52:49 +00:00
m4 tools: remove static linking support 2015-02-06 00:00:43 +00:00
make-ext4fs source: Switch to xz for packages and tools where possible 2016-10-06 12:16:56 +02:00
missing-macros tools: remove a bunch of unused automake macros 2015-03-17 10:11:00 +00:00
mkimage tools: mkimage: sync include/linux/compiler*.h with u-boot master 2016-05-08 23:37:40 +02:00
mklibs tools: remove static linking support 2015-02-06 00:00:43 +00:00
mm-macros mm-macros: update to 0.9.10 2016-03-10 19:11:32 +00:00
mpc tools/mpc: update to 1.0.3 2015-11-03 11:59:35 +00:00
mpfr tools/mpfr: Update to 3.1.5 and change to xz tarball 2016-10-04 11:50:47 +02:00
mtd-utils source: Switch to xz for packages and tools where possible 2016-10-06 12:16:56 +02:00
mtools mtools: build and install mmd 2015-10-11 16:23:11 +00:00
padjffs2 tools: padjffs2: add option to output padding data to stdout 2016-07-11 13:26:33 +02:00
patch tools/patch: enable parallel build 2015-09-26 21:10:37 +00:00
patch-image tools: patch-image: Added optional size option 2016-06-21 21:58:07 +02:00
patchelf tools/patchelf: Update to 0.9 and remove patch 2016-10-04 11:50:48 +02:00
pkg-config tools: pkg-config: fix build with GCC 6 2016-05-08 23:37:40 +02:00
ppl tools/ppl: Update to 1.2 2016-10-04 11:50:47 +02:00
qemu tools: remove static linking support 2015-02-06 00:00:43 +00:00
quilt tools/quilt: fix build error during kernel_menuconfig on a cleaned env 2015-11-07 12:52:14 +00:00
scons tools/scons: update to 2.5.0 2016-08-15 15:32:37 +02:00
sdimage source: Switch to xz for packages and tools where possible 2016-10-06 12:16:56 +02:00
sed tools/sed: fix compile on musl hosts 2015-05-04 13:22:17 +00:00
sparse sparse: update to support llvm 3.5.0 2016-06-13 12:49:34 +02:00
squashfs tools/squashfs: refresh patches 2015-12-11 15:07:28 +00:00
squashfs4 squashfs4: use upstream xz compression header format 2016-06-22 19:32:06 +02:00
sstrip tools: remove static linking support 2015-02-06 00:00:43 +00:00
tar tools: tar: use .bz2 archive 2016-10-06 14:12:46 +02:00
upslug2 source: Switch to xz for packages and tools where possible 2016-10-06 12:16:56 +02:00
upx tools/upx: Update to 3.91 and use new tarball url 2016-10-04 11:50:48 +02:00
wrt350nv2-builder tools: remove static linking support 2015-02-06 00:00:43 +00:00
xz tools: xz: force building without ccache 2016-10-06 15:29:33 +02:00
yaffs2 source: Switch to xz for packages and tools where possible 2016-10-06 12:16:56 +02:00
Makefile tools: add missing dependency for dosfstools 2016-10-12 12:25:27 +02:00