Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:olh:xen-4.7
qemu-2.8
qemu.4d04351f4c3db3b70dc21f7fdc8155e341f39916.p...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File qemu.4d04351f4c3db3b70dc21f7fdc8155e341f39916.patch of Package qemu-2.8
From: Christopher Covington <cov@codeaurora.org> Date: Wed, 28 Dec 2016 15:04:33 -0500 Subject: 4d04351f4c3db3b70dc21f7fdc8155e341f39916 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit build: include sys/sysmacros.h for major() and minor() The definition of the major() and minor() macros are moving within glibc to <sys/sysmacros.h>. Include this header when it is available to avoid the following sorts of build-stopping messages: qga/commands-posix.c: In function ‘dev_major_minor’: qga/commands-posix.c:656:13: error: In the GNU C Library, "major" is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "major", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "major", you should undefine it after including <sys/types.h>. [-Werror] *devmajor = major(st.st_rdev); ^~~~~~~~~~~~~~~~~~~~~~~~~~ qga/commands-posix.c:657:13: error: In the GNU C Library, "minor" is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "minor", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "minor", you should undefine it after including <sys/types.h>. [-Werror] *devminor = minor(st.st_rdev); ^~~~~~~~~~~~~~~~~~~~~~~~~~ The additional include allows the build to complete on Fedora 26 (Rawhide) with glibc version 2.24.90. Signed-off-by: Christopher Covington <cov@codeaurora.org> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> --- configure | 18 ++++++++++++++++++ include/sysemu/os-posix.h | 4 ++++ 2 files changed, 22 insertions(+) --- a/configure +++ b/configure @@ -4724,24 +4724,38 @@ if ! compile_object ""; then error_exit "Failed to compile object file for LD_REL_FLAGS test" fi for i in '-Wl,-r -Wl,--no-relax' -Wl,-r -r; do if do_cc -nostdlib $i -o $TMPMO $TMPO; then LD_REL_FLAGS=$i break fi done if test "$modules" = "yes" && test "$LD_REL_FLAGS" = ""; then feature_not_found "modules" "Cannot find how to build relocatable objects" fi +########################################## +# check for sysmacros.h + +have_sysmacros=no +cat > $TMPC << EOF +#include <sys/sysmacros.h> +int main(void) { + return makedev(0, 0); +} +EOF +if compile_prog "" "" ; then + have_sysmacros=yes +fi + ########################################## # End of CC checks # After here, no more $cc or $ld runs if test "$gcov" = "yes" ; then CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS" LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS" elif test "$fortify_source" = "yes" ; then CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS" elif test "$debug" = "no"; then CFLAGS="-O2 $CFLAGS" fi @@ -5697,24 +5711,28 @@ fi if test "$have_rtnetlink" = "yes" ; then echo "CONFIG_RTNETLINK=y" >> $config_host_mak fi if test "$replication" = "yes" ; then echo "CONFIG_REPLICATION=y" >> $config_host_mak fi if test "$have_af_vsock" = "yes" ; then echo "CONFIG_AF_VSOCK=y" >> $config_host_mak fi +if test "$have_sysmacros" = "yes" ; then + echo "CONFIG_SYSMACROS=y" >> $config_host_mak +fi + # Hold two types of flag: # CONFIG_THREAD_SETNAME_BYTHREAD - we've got a way of setting the name on # a thread we have a handle to # CONFIG_PTHREAD_SETNAME_NP - A way of doing it on a particular # platform if test "$pthread_setname_np" = "yes" ; then echo "CONFIG_THREAD_SETNAME_BYTHREAD=y" >> $config_host_mak echo "CONFIG_PTHREAD_SETNAME_NP=y" >> $config_host_mak fi if test "$tcg_interpreter" = "yes"; then QEMU_INCLUDES="-I\$(SRC_PATH)/tcg/tci $QEMU_INCLUDES" --- a/include/sysemu/os-posix.h +++ b/include/sysemu/os-posix.h @@ -25,24 +25,28 @@ #ifndef QEMU_OS_POSIX_H #define QEMU_OS_POSIX_H #include <sys/mman.h> #include <sys/socket.h> #include <netinet/in.h> #include <netinet/tcp.h> #include <arpa/inet.h> #include <netdb.h> #include <sys/un.h> +#ifdef CONFIG_SYSMACROS +#include <sys/sysmacros.h> +#endif + void os_set_line_buffering(void); void os_set_proc_name(const char *s); void os_setup_signal_handling(void); void os_daemonize(void); void os_setup_post(void); int os_mlock(void); #define closesocket(s) close(s) #define ioctlsocket(s, r, v) ioctl(s, r, v) typedef struct timeval qemu_timeval; #define qemu_gettimeofday(tp) gettimeofday(tp, NULL)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor