From 93a7186512494624b3eba9f0bbf395128c202178 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Tue, 25 Nov 2014 11:16:24 -0800 Subject: [PATCH] Fix build after C++11 migration. More UD literal issues. `using namespace std` should be illegal. Change-Id: If408f360e28acf9159705b9b724c7c083391ff71 --- mobicore/common/LogWrapper/log.h | 12 ++++++------ mobicore/daemon/Daemon/Server/NetlinkServer.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mobicore/common/LogWrapper/log.h b/mobicore/common/LogWrapper/log.h index 36c1746..2ffc0b2 100644 --- a/mobicore/common/LogWrapper/log.h +++ b/mobicore/common/LogWrapper/log.h @@ -68,8 +68,8 @@ #define LOG_W(fmt, args...) DUMMY_FUNCTION() #else // add LINE - #define LOG_I(fmt, args...) LOG_i(fmt";%d", ## args, __LINE__) - #define LOG_W(fmt, args...) LOG_w(fmt";%d", ## args, __LINE__) + #define LOG_I(fmt, args...) LOG_i(fmt ";%d", ## args, __LINE__) + #define LOG_W(fmt, args...) LOG_w(fmt ";%d", ## args, __LINE__) #endif // LOG_E is always defined #define _LOG_E(fmt, args...) LOG_e(fmt, ## args) @@ -98,10 +98,10 @@ #define LOG_I(fmt, args...) DUMMY_FUNCTION() #define LOG_W(fmt, args...) DUMMY_FUNCTION() #else - #define LOG_I(...) _LOG_x("I",__VA_ARGS__) - #define LOG_W(...) _LOG_x("W",__VA_ARGS__) + #define LOG_I(...) _LOG_x("I", __VA_ARGS__) + #define LOG_W(...) _LOG_x("W", __VA_ARGS__) #endif - #define _LOG_E(...) _LOG_x("E",__VA_ARGS__) + #define _LOG_E(...) _LOG_x("E", __VA_ARGS__) #endif //defined(LOG_ANDROID) @@ -118,7 +118,7 @@ do \ { \ _LOG_E(" *****************************"); \ - _LOG_E(" *** ERROR: "__VA_ARGS__); \ + _LOG_E(" *** ERROR: " __VA_ARGS__); \ _LOG_E(" *** Detected in %s:%i/%s()", __FILE__, __LINE__, __FUNCTION__); \ _LOG_E(" *****************************"); \ } while(1!=1) diff --git a/mobicore/daemon/Daemon/Server/NetlinkServer.cpp b/mobicore/daemon/Daemon/Server/NetlinkServer.cpp index cdf80f5..73d08c4 100644 --- a/mobicore/daemon/Daemon/Server/NetlinkServer.cpp +++ b/mobicore/daemon/Daemon/Server/NetlinkServer.cpp @@ -78,7 +78,7 @@ void NetlinkServer::run( src_addr.nl_family = AF_NETLINK; src_addr.nl_pid = MC_DAEMON_PID; /* daemon pid */ src_addr.nl_groups = 0; /* not in mcast groups */ - if (bind(serverSock, (struct sockaddr *)&src_addr, sizeof(src_addr)) < 0) { + if (::bind(serverSock, (struct sockaddr *)&src_addr, sizeof(src_addr)) < 0) { LOG_ERRNO("Binding to server socket failed, because bind"); close(serverSock); break; -- 2.20.1