Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifications to support non-Linux OSes (tested on FreeBSD 14) #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

21M4TW
Copy link

@21M4TW 21M4TW commented Oct 23, 2024

-Modifying CMakeLists.txt to support non-Linux OSes that do not include epoll and argp. Using epoll-shim and the standalone argp libraries. Tested on FreeBSD 14
-Including <netiniet/in.h> in src/datum_protocol.c. This is required for compilation on FreeBSD 14

epoll and argp. Using epoll-shim and the standalone argp libraries.
Tested on FreeBSD 14
-Including <netiniet/in.h> in src/datum_protocol.c. This is required for
compilation on FreeBSD 14
@@ -41,6 +41,15 @@ pkg_check_modules(MICROHTTPD REQUIRED libmicrohttpd)
pkg_check_modules(SODIUM REQUIRED libsodium)
find_package(Threads REQUIRED)

if(NOT LINUX)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a good way to do build conditionals. Need to check if epoll/argp work without extra libs, and check for extra libs if needed.

Noteworthy, some Linux distros do not have argp.

@@ -95,3 +105,43 @@ target_compile_options(datum_gateway
${JANSSON_CFLAGS} ${JANSSON_CFLAGS_OTHER}
${SODIUM_CFLAGS} ${SODIUM_CFLAGS_OTHER}
)

else()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't duplicate the whole thing. Just set the new vars to empty if not needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants