drizzle's sleep plugin fails to compile with boost >= 1.50

Bug #1132659 reported by David Arnold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Undecided
Unassigned

Bug Description

In boost-1.50, the existing TIME_UTC macro is renamed to TIME_UTC_ (note the trailing underscore) due to a conflict with C11. For details, see boost issue #6940 (https://svn.boost.org/trac/boost/ticket/6940).

Suggest adding something like

#include <boost/version.hpp>
#if BOOST_VERSION < 105000
# if __STDC_VERSION__ >= 201112L
# error Cannot use Boost < 1.50 with C11 compiler. Upgrade Boost or downgrade compiler.
# else
# define TIME_UTC_ TIME_UTC
# endif
#endif

and using TIME_UTC_ in plugins/sleep/sleep.cc

Revision history for this message
David Arnold (davida) wrote :

Also breaks

client/drizzleslap.cc:1937: error: 'TIME_UTC' is not a member of 'boost'
make[2]: *** [client/client_drizzleslap-drizzleslap.o] Error 1

Same fix.

Revision history for this message
David Arnold (davida) wrote :

And ...

drizzled/drizzled.cc: In function 'void drizzled::close_connections()':
drizzled/drizzled.cc:453: error: 'TIME_UTC' is not a member of 'boost'
make[2]: *** [drizzled/drizzled.o] Error 1

Revision history for this message
coldtobi (tobi-coldtobi) wrote :

For 7.1.36 I made a patch for Debian:
Not tested if it applied to trunk.

Revision history for this message
coldtobi (tobi-coldtobi) wrote :

I just saw that trunk already contains code for it.
However, this collision can already happen with boost 1.49

Revision history for this message
Stewart Smith (stewart) wrote :

I'm closing this as Fix Committed then as it appears that it is, in fact, fixed.

Changed in drizzle:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.