diff --git a/VERSION.TXT b/VERSION.TXT index 65d2e34..b6e6f76 100644 --- a/VERSION.TXT +++ b/VERSION.TXT @@ -1,5 +1,10 @@ NORM Version History +Version 1.5.8 +============= + - Corrections to eliminate compiler warnings and suport kfreebsd builds + (Thanks to Luca Buccassi) + Version 1.5.7 ============= - Fixed issue with NormSession::SenderRemoveAckingNode() method where diff --git a/include/normApi.h b/include/normApi.h index e0ecce2..3beaae0 100644 --- a/include/normApi.h +++ b/include/normApi.h @@ -33,7 +33,11 @@ typedef int32_t INT32; typedef uint8_t UINT8; typedef uint16_t UINT16; typedef uint32_t UINT32; -#define NORM_API_LINKAGE +#if (defined __GNUC__ && __GNUC__ >= 4) +#define NORM_API_LINKAGE __attribute__ ((visibility ("default"))) +#else +#define NORM_API_LINKAGE +#endif #endif // if/else WIN32/UNIX //////////////////////////////////////////////////////////// @@ -324,6 +328,8 @@ void NormSetTxOnly(NormSessionHandle sessionHandle, bool txOnly, bool connectToSessionAddress DEFAULT(false)); +NORM_API_LINKAGE +void NormSetId(NormSessionHandle sessionHandle, NormNodeId normId); // This does not affect the rx_socket binding if already bound (sender or receiver already started) // (i.e., just affects where NORM packets are sent) diff --git a/include/normVersion.h b/include/normVersion.h index c558a2e..4e969fa 100644 --- a/include/normVersion.h +++ b/include/normVersion.h @@ -36,6 +36,6 @@ #ifndef _NORM_VERSION #define _NORM_VERSION -#define VERSION "1.5.7" +#define VERSION "1.5.8" #endif // _NORM_VERSION diff --git a/src/common/normFile.cpp b/src/common/normFile.cpp index 2ba3acf..535d8b9 100644 --- a/src/common/normFile.cpp +++ b/src/common/normFile.cpp @@ -185,10 +185,16 @@ void NormFile::Unlock() { #ifndef WIN32 #ifdef HAVE_FLOCK - flock(fd, LOCK_UN); + if (0 != flock(fd, LOCK_UN)) + { + PLOG(PL_ERROR, "NormFile::Unlock() flock() error: %s\n", GetErrorString()); + } #else #ifdef HAVE_LOCKF - lockf(fd, F_ULOCK, 0); + if (0 != lockf(fd, F_ULOCK, 0)) + { + PLOG(PL_ERROR, "NormFile::Unlock() lockf() error: %s\n", GetErrorString()); + } #endif // HAVE_LOCKF #endif // if/elseHAVE_FLOCK fchmod(fd, 0640); diff --git a/wscript b/wscript index ebcaf4a..8428899 100644 --- a/wscript +++ b/wscript @@ -64,6 +64,10 @@ def configure(ctx): if system == 'windows': ctx.env.DEFINES_BUILD_NORM += ['NORM_USE_DLL'] + if ctx.env.COMPILER_CXX == 'g++' or ctx.env.COMPILER_CXX == 'clang++': + ctx.env.CFLAGS += ['-fvisibility=hidden'] + ctx.env.CXXFLAGS += ['-fvisibility=hidden'] + def build(ctx): ctx.recurse('protolib')