Lines 1-6
Link Here
|
1 |
--- third_party/sqlite/src/amalgamation/sqlite3.c.orig 2024-05-21 18:07:39 UTC |
1 |
--- third_party/sqlite/src/amalgamation/sqlite3.c.orig 2024-05-23 22:40:42 UTC |
2 |
+++ third_party/sqlite/src/amalgamation/sqlite3.c |
2 |
+++ third_party/sqlite/src/amalgamation/sqlite3.c |
3 |
@@ -44777,7 +44777,12 @@ static int unixRandomness(sqlite3_vfs *NotUsed, int nB |
3 |
@@ -20533,6 +20533,9 @@ SQLITE_PRIVATE int sqlite3HeapNearlyFull(void); |
|
|
4 |
** that deal with sqlite3StackAlloc() failures to be unreachable. |
5 |
*/ |
6 |
#ifdef SQLITE_USE_ALLOCA |
7 |
+# if !defined(alloca) && defined(__FreeBSD__) |
8 |
+# define alloca(sz) __builtin_alloca(sz) |
9 |
+# endif |
10 |
# define sqlite3StackAllocRaw(D,N) alloca(N) |
11 |
# define sqlite3StackAllocRawNN(D,N) alloca(N) |
12 |
# define sqlite3StackFree(D,P) |
13 |
@@ -44777,7 +44780,12 @@ static int unixRandomness(sqlite3_vfs *NotUsed, int nB |
4 |
memset(zBuf, 0, nBuf); |
14 |
memset(zBuf, 0, nBuf); |
5 |
randomnessPid = osGetpid(0); |
15 |
randomnessPid = osGetpid(0); |
6 |
#if !defined(SQLITE_TEST) && !defined(SQLITE_OMIT_RANDOMNESS) |
16 |
#if !defined(SQLITE_TEST) && !defined(SQLITE_OMIT_RANDOMNESS) |
Lines 13-19
Link Here
|
13 |
int fd, got; |
23 |
int fd, got; |
14 |
fd = robust_open("/dev/urandom", O_RDONLY, 0); |
24 |
fd = robust_open("/dev/urandom", O_RDONLY, 0); |
15 |
if( fd<0 ){ |
25 |
if( fd<0 ){ |
16 |
@@ -44792,6 +44797,7 @@ static int unixRandomness(sqlite3_vfs *NotUsed, int nB |
26 |
@@ -44792,6 +44800,7 @@ static int unixRandomness(sqlite3_vfs *NotUsed, int nB |
17 |
robust_close(0, fd, __LINE__); |
27 |
robust_close(0, fd, __LINE__); |
18 |
} |
28 |
} |
19 |
} |
29 |
} |