head 1.1; access; symbols; locks; strict; comment @ * @; 1.1 date 2026.11.23.08.07.34; author wiz; state Exp; branches; next ; commitid iQXAVQX1b41KKy4H; desc @@ 1.1 log @sra-tools: fix build with cmake 4.5 While here, add a patch to fix build on NetBSD. @ text @$NetBSD$ Fix build on NetBSD. --- ncbi-vdb/libs/klib/unix/systime.c.orig 2026-11-23 08:04:07.925755705 +0000 +++ ncbi-vdb/libs/klib/unix/systime.c @@@@ -24,11 +24,13 @@@@ * */ +#ifdef __linux__ #define _XOPEN_SOURCE /* strptime */ #if _POSIX_C_SOURCE < 199309L && ! defined __FreeBSD__ #define _POSIX_C_SOURCE 199309L #endif +#endif #include #include @@@@ -265,7 +267,7 @@@@ LIB_EXPORT rc_t CC KSleepMs(uint32_t milliseconds) { time.tv_sec = (milliseconds / 1000); time.tv_nsec = (milliseconds % 1000) * 1000 * 1000; -#if _POSIX_C_SOURCE >= 199309L || defined __FreeBSD__ +#if _POSIX_C_SOURCE >= 199309L || defined __FreeBSD__ || defined(__NetBSD__) if ( nanosleep ( & time, NULL ) != 0 ) #else #error "nanosleep is not guaranteed here" @