Bug#833956: wine-development: FTBFS on hurd-i386 and kfreebsd-i386
[ I hope I got the CC and tags right, first time I look into a
portability issue. ]
src:wine-development since 1.9.15-1 fails to build on hurd-i386
and kfreebsd-i386. It built successfully before.
The later uploaded src:wine 1.8.3-3 still builds successfully.
Build log for hurd-i386:
Build log kfreebsd-i386:
gcc -c -o virtual.o virtual.c -I. -I../../include -D__WINESRC__ -D_NTSYSTEM_ -D_REENTRANT -fPIC -Wall \
-pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers \
-Wstrict-prototypes -Wtype-limits -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith \
-Wlogical-op -gdwarf-2 -gstrict-dwarf -fno-omit-frame-pointer -Werror -Wdate-time -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wno-error
virtual.c: In function 'virtual_get_system_info':
virtual.c:1363:20: error: storage size of 'sinfo' isn't known
struct sysinfo sinfo;
virtual.c:1372:10: warning: implicit declaration of function 'sysinfo' [-Wimplicit-function-declaration]
virtual.c:1363:20: warning: unused variable 'sinfo' [-Wunused-variable]
struct sysinfo sinfo;
Makefile:711: recipe for target 'virtual.o' failed
I assume (not tested) this is because of:
Author: Michael Müller <firstname.lastname@example.org>
Date: Fri Jul 8 05:40:22 2016 +0200
ntdll: Use sysinfo to report correct number of physical pages.
Signed-off-by: Michael Müller <email@example.com>
Signed-off-by: Sebastian Lackner <firstname.lastname@example.org>
Signed-off-by: Alexandre Julliard <email@example.com>
The code is only called conditionally (ifdef HAVE_SYS_SYSINFO_H).
It has "include <sys/sysinfo.h>", which is provided in:
/usr/include/i386-gnu/sys/sysinfo.h libc0.3-dev [hurd-i386]
/usr/include/i386-kfreebsd-gnu/sys/sysinfo.h libc0.1-dev [kfreebsd-i386]
However "totalram" and "mem_unit" are only in:
So sysinfo.h exists on hurd/kfreebsd, but doesn't provide everything
necessary!? Is there a fix for this, or should we disable this code
on hurd/kfreebsd explicitly? Or am I on a completely wrong track here?
Patches welcome, otherwise I'll ask upstream.
I found a similar (not identical) issue in busybox: