Make pthread optional

Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
2025-07-24 21:43:47 +03:00
parent 750be23551
commit 3fdda1bbaa
2 changed files with 32 additions and 13 deletions

View File

@@ -11,7 +11,18 @@
#include <stdlib.h>
#include <string.h>
#ifdef DCFG_PTHREAD_SUPPORT
#include <pthread.h>
#else
typedef struct {
int unused;
} pthread_mutex_t;
void pthread_mutex_init(pthread_mutex_t *, void *);
void pthread_mutex_destroy(pthread_mutex_t *);
void pthread_mutex_lock(pthread_mutex_t *);
void pthread_mutex_unlock(pthread_mutex_t *);
#endif
int64_t dcfg_strtoll(const char *s, char **end, int base) {
size_t n = strlen(s);