summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e4da452)
If sigaction is not available just stub out the set_signal_handler()
function.
include_directories(${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS})
include_directories(${FFMPEG_LIBSWSCALE_INCLUDE_DIRS})
include_directories(${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS})
include_directories(${FFMPEG_LIBSWSCALE_INCLUDE_DIRS})
+ set(CMAKE_REQUIRED_DEFINITIONS -D_POSIX_SOURCE)
+ check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION)
+ if (HAVE_SIGACTION)
+ add_definitions("-DHAVE_SIGACTION")
+ endif()
+ set(CMAKE_REQUIRED_DEFINITIONS)
+
# xcb is used to retrieve the full screen dimensions when using x11grab
# as input format
find_package(XCB)
# xcb is used to retrieve the full screen dimensions when using x11grab
# as input format
find_package(XCB)
static int set_signal_handler(void (*signal_handler)(int))
{
struct sigaction new_action;
static int set_signal_handler(void (*signal_handler)(int))
{
struct sigaction new_action;
+#else
+static int set_signal_handler(void (*signal_handler)(int))
+{
+ (void)signal_handler;
+ fprintf(stderr, "set_signal_handler() not implemented, sigaction not available\n");
+ return 0;
+}
+#endif
+
static void usage(char *name)
{
static void usage(char *name)
{