Skip to content

Commit e6a40c8

Browse files
committed
Added macOS-specific compiler flag; added BSD type support; fixed -Wnewline-eof errors.
1 parent e370502 commit e6a40c8

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ foreach(target libwsv5_static libwsv5_shared)
9393
-Wpedantic
9494
-Wno-unused-parameter
9595
)
96+
97+
# macOS specific flags for BSD type compatibility
98+
if(APPLE)
99+
target_compile_options(${target} PRIVATE
100+
-D_DEFAULT_SOURCE
101+
)
102+
endif()
96103
endforeach()
97104

98105
# Optional: Build test program

libwsv5.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212

1313
#define _POSIX_C_SOURCE 200809L
14+
#define _DEFAULT_SOURCE
1415

1516
#include "libwsv5.h"
1617

@@ -3075,4 +3076,4 @@ obsws_error_t obsws_set_source_filter_enabled(obsws_connection_t *conn, const ch
30753076
}
30763077

30773078
return result;
3078-
}
3079+
}

libwsv5.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1272,4 +1272,4 @@ void obsws_free_scene_list(char **scenes, size_t count);
12721272
}
12731273
#endif
12741274

1275-
#endif // LIBWSV5_LIBRARY_H
1275+
#endif // LIBWSV5_LIBRARY_H

0 commit comments

Comments
 (0)