[systemd-devel] [PATCH] include: fix problem with __LINE__ macro expansion

Lukasz Skalski l.skalski at partner.samsung.com
Thu Nov 21 08:26:57 PST 2013


Hi all,

Macro __LINE__ in #define assert_cc() (src/shared/macro.h) is not 
properly expanded.

Please find patch in attachment for review.

Otherwise, build fail:

Making all in .
   CC     src/libsystemd-bus/libsystemd_bus_la-sd-bus.lo
In file included from src/libsystemd-bus/sd-bus.c:48:0:
src/libsystemd-bus/bus-util.h:84:1: error: redefinition of 'struct 
_assert_struct___LINE__'
src/libsystemd-bus/bus-util.h:81:1: note: originally defined here
src/libsystemd-bus/bus-util.h:106:1: error: redefinition of 'struct 
_assert_struct___LINE__'
src/libsystemd-bus/bus-util.h:84:1: note: originally defined here
src/libsystemd-bus/bus-util.h:109:1: error: redefinition of 'struct 
_assert_struct___LINE__'
src/libsystemd-bus/bus-util.h:106:1: note: originally defined here
src/libsystemd-bus/bus-util.h:112:1: error: redefinition of 'struct 
_assert_struct___LINE__'
src/libsystemd-bus/bus-util.h:109:1: note: originally defined here
src/libsystemd-bus/bus-util.h:115:1: error: redefinition of 'struct 
_assert_struct___LINE__'
src/libsystemd-bus/bus-util.h:112:1: note: originally defined here
make[2]: *** [src/libsystemd-bus/libsystemd_bus_la-sd-bus.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

-- 
Lukasz Skalski
Samsung R&D Institute Poland
Samsung Electronics
l.skalski at partner.samsung.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-include-fix-problem-with-__LINE__-macro-expansion.patch
Type: text/x-patch
Size: 1104 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20131121/bc0e9530/attachment-0001.bin>


More information about the systemd-devel mailing list