diff --git a/src/blackmagic_common.cpp b/src/blackmagic_common.cpp index 2cbbd4901..95b149bff 100644 --- a/src/blackmagic_common.cpp +++ b/src/blackmagic_common.cpp @@ -35,21 +35,22 @@ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#include "config_unix.h" -#include "config_win32.h" -#endif - #include +#include // for isxdigit +#include // for seconds #include +#include // for fprintf, stderr +#include // for strlen, NULL, strdup, memcpy, size_t #include #include +#include // for mutex, lock_guard, unique_lock #include #include #include #include +#include "compat/htonl.h" +#include "compat/misc.h" // for strncasecmp #include "DeckLinkAPIVersion.h" #include "blackmagic_common.hpp" #include "debug.h" diff --git a/src/compat/misc.h b/src/compat/misc.h index 2fc742152..2104c49b0 100644 --- a/src/compat/misc.h +++ b/src/compat/misc.h @@ -9,7 +9,7 @@ * implementation file should be defined. */ /* - * Copyright (c) 2021 CESNET, z. s. p. o. + * Copyright (c) 2021-2024 CESNET * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -50,5 +50,17 @@ #define strdupa(s) (char *) memcpy(alloca(strlen(s) + 1), s, strlen(s) + 1) #endif // defined strdupa +// str[n]casecmp +#ifdef _WIN32 // also defined in config_win32.h +#ifndef strcasecmp +#define strcasecmp _stricmp +#endif // defined strcasecmp +#ifndef strncasecmp +#define strncasecmp _strnicmp +#endif // defined strncasecmp +#else +#include +#endif + #endif // defined COMPAT_MISC_H_20C709DB_F4A8_4744_A0A9_96036B277011