File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -280,8 +280,8 @@ foreach(ex_src ${EXAMPLE_C_SOURCES} ${EXAMPLE_CXX_SOURCES})
280280 target_link_libraries (${ex_name} turboquant )
281281endforeach ()
282282
283- # OpenAI-compatible HTTP server
284- if (TQ_BUILD_SERVER)
283+ # OpenAI-compatible HTTP server (POSIX only — uses sys/socket.h)
284+ if (TQ_BUILD_SERVER AND NOT MSVC )
285285 add_executable (quant-server src/server/tq_server.c )
286286 target_include_directories (quant-server PRIVATE
287287 ${CMAKE_SOURCE_DIR} /src/server
Original file line number Diff line number Diff line change @@ -144,8 +144,9 @@ typedef volatile long atomic_int;
144144#ifndef CLOCK_MONOTONIC
145145#define CLOCK_MONOTONIC 1
146146#endif
147- #ifndef _TIMESPEC_DEFINED
148- #define _TIMESPEC_DEFINED
147+ #if !defined(_TIMESPEC_DEFINED) && !defined(__struct_timespec_defined)
148+ #define _TIMESPEC_DEFINED 1
149+ #define __struct_timespec_defined 1
149150struct timespec { long tv_sec; long tv_nsec; };
150151#endif
151152static inline int clock_gettime(int id, struct timespec* ts) {
Original file line number Diff line number Diff line change 4343#ifndef CLOCK_MONOTONIC
4444#define CLOCK_MONOTONIC 1
4545#endif
46- #if defined(_WIN32 ) && !defined(_TIMESPEC_DEFINED )
47- #define _TIMESPEC_DEFINED
46+ #if defined(_WIN32 ) && !defined(_TIMESPEC_DEFINED ) && !defined(__struct_timespec_defined )
47+ #define _TIMESPEC_DEFINED 1
48+ #define __struct_timespec_defined 1
4849struct timespec { long tv_sec ; long tv_nsec ; };
4950#endif
5051static int clock_gettime (int id , struct timespec * ts ) {
You can’t perform that action at this time.
0 commit comments