[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [mosquitto-dev] patches from pkgsrc for discussion, based on 1.6.1
|
I am also carrying a patch to disable -ldl. NetBSD has no such library.
I'm not sure what's usually in it, whether POSIX specifies that it
should exist, or if it should be used under what circumstances.
I wonder if it should be affirmatively when appropriate, if there is no
basis in POSIX to include it. The entire if/block near this has a lot
of OS-specific code, and I also wonder if it would be appropriate to
instead have configure tests to see if the various optional
system-specific libraries exist, and if so add in each one.
I include the patch to be specific; I don't claim this is the right fix,
just the fix I am making to enable building with minimal changes.
$NetBSD$
On NetBSD, don't use -ldl (why?).
--- src/CMakeLists.txt.orig 2019-04-17 19:54:00.000000000 +0000
+++ src/CMakeLists.txt
@@ -146,6 +146,8 @@ endif (HAVE_GETADDRINFO_A)
if (UNIX)
if (APPLE)
set (MOSQ_LIBS ${MOSQ_LIBS} dl m)
+ elseif (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
+ set (MOSQ_LIBS ${MOSQ_LIBS} m)
elseif(QNX)
set(MOSQ_LIBS ${MOSQ_LIBS} m socket)
else(APPLE)