Skip to content

[OpenBSD] minor fixes to make it build. #899

Closed

Description

@c64skin

CMakeLists.txt:

--- CMakeLists.txt.orig	Fri Jan 27 21:09:59 2023
+++ CMakeLists.txt	Fri Jan 27 21:23:34 2023
@@ -513,8 +513,12 @@
 	else()
 		target_compile_definitions(${PROJECT_NAME} PRIVATE EGL_NO_X11)
 	endif()
-
+    
+    if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+	target_link_libraries(${PROJECT_NAME} PRIVATE ${CMAKE_DL_LIBS})
+    else()
 	target_link_libraries(${PROJECT_NAME} PRIVATE ${CMAKE_DL_LIBS} rt)
+    endif()
 endif()
 
 if(ASAN)

core/network/net_platform.h:

--- net_platform.h.orig	Fri Jan 27 20:16:11 2023
+++ net_platform.h	Fri Jan 27 20:16:43 2023
@@ -89,7 +89,7 @@
 #if defined(_WIN32)
 	struct protoent *tcp_proto = getprotobyname("TCP");
 	setsockopt(fd, tcp_proto->p_proto, TCP_NODELAY, (const char *)&optval, optlen);
-#elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
+#elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
 	setsockopt(fd, SOL_TCP, TCP_NODELAY, (const void *)&optval, optlen);
 #else
 	struct protoent *tcp_proto = getprotobyname("TCP");

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions