Skip to content

Commit 103a45a

Browse files
committed
Update main.yml and dbmem-utils.c for build configuration and timestamp handling
1 parent a2c1311 commit 103a45a

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ jobs:
263263

264264
- uses: actions/checkout@v4.2.2
265265
with:
266-
submodules: ${{ contains(matrix.make, 'LLAMA=') && 'true' || 'false' }}
266+
submodules: ${{ !contains(matrix.make, 'OMIT_LOCAL_ENGINE=1') && 'true' || 'false' }}
267267

268268
- name: windows install sqlite (remote builds)
269269
if: matrix.name == 'windows' && matrix.variant == 'remote'

src/dbmem-utils.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#include <string.h>
1111
#include <stdlib.h>
1212
#include <stdbool.h>
13+
#include <stdio.h>
14+
#include <time.h>
1315
#include <sys/stat.h>
1416

1517
#include "dbmem-utils.h"
@@ -167,10 +169,11 @@ int dbmem_compute_uuid_v7 (uint8_t value[DBMEM_UUID_LEN]) {
167169

168170
// get current timestamp in ms
169171
struct timespec ts;
170-
#ifdef __ANDROID__
171-
if (clock_gettime(CLOCK_REALTIME, &ts) != 0) return -1;
172-
#else
172+
#if defined(__APPLE__)
173173
if (timespec_get(&ts, TIME_UTC) == 0) return -1;
174+
#else
175+
// Use clock_gettime for Linux/Android/Windows (timespec_get not available on older glibc)
176+
if (clock_gettime(CLOCK_REALTIME, &ts) != 0) return -1;
174177
#endif
175178

176179
// add timestamp part to UUID

0 commit comments

Comments
 (0)