Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 06 Sep 2016 18:49:55 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 212426] emulators/open-vm-tools emulators/open-vm-tools-nox11: Fix build with clang 3.9.0
Message-ID:  <bug-212426-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D212426

            Bug ID: 212426
           Summary: emulators/open-vm-tools emulators/open-vm-tools-nox11:
                    Fix build with clang 3.9.0
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: swills@FreeBSD.org
          Reporter: dim@FreeBSD.org
          Assignee: swills@FreeBSD.org
             Flags: maintainer-feedback?(swills@FreeBSD.org)

Created attachment 174432
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D174432&action=
=3Dedit
Make definition of __IS_FREEBSD__ more portable

While testing the clang390-import branch, building emulators/open-vm-tools =
or
emulators/open-vm-tools-nox11 results in the following -Werror warnings:

hgfsServerLinux.c:1989:8: error: macro expansion producing 'defined' has
undefined behavior [-Werror,-Wexpansion-to-defined]
#   if __IS_FREEBSD_VER__(500043)
       ^
/wrkdirs/usr/ports/emulators/open-vm-tools-nox11/work/open-vm-tools-9.4.0-1=
280544/lib/include/vm_basic_defs.h:85:34:
note: expanded from macro '__IS_FREEBSD_VER__'
#define __IS_FREEBSD_VER__(ver) (__IS_FREEBSD__ && __FreeBSD_version >=3D (=
ver))
                                 ^
/wrkdirs/usr/ports/emulators/open-vm-tools-nox11/work/open-vm-tools-9.4.0-1=
280544/lib/include/vm_basic_defs.h:84:26:
note: expanded from macro '__IS_FREEBSD__'
#define __IS_FREEBSD__ (!defined(VMKERNEL) && defined(__FreeBSD__))
                         ^
hgfsServerLinux.c:1989:8: error: macro expansion producing 'defined' has
undefined behavior [-Werror,-Wexpansion-to-defined]
/wrkdirs/usr/ports/emulators/open-vm-tools-nox11/work/open-vm-tools-9.4.0-1=
280544/lib/include/vm_basic_defs.h:85:34:
note: expanded from macro '__IS_FREEBSD_VER__'
#define __IS_FREEBSD_VER__(ver) (__IS_FREEBSD__ && __FreeBSD_version >=3D (=
ver))
                                 ^
--- hgfsDirNotifyStub.lo ---
mv -f .deps/hgfsDirNotifyStub.Tpo .deps/hgfsDirNotifyStub.Plo
--- hgfsServerLinux.lo ---
/wrkdirs/usr/ports/emulators/open-vm-tools-nox11/work/open-vm-tools-9.4.0-1=
280544/lib/include/vm_basic_defs.h:84:47:
note: expanded from macro '__IS_FREEBSD__'
#define __IS_FREEBSD__ (!defined(VMKERNEL) && defined(__FreeBSD__))
                                              ^
2 errors generated.

This is because the macro __IS_FREEBSD__ expands to something with defined(=
) in
it, which is undefined.  Fix it by using a more portable way of defining
__IS_FREEBSD__.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-212426-13>