annotate OrthancFramework/Resources/Patches/e2fsprogs-1.44.5.patch @ 5103:899f303613fb

merge from 1.11.2 branch
author Alain Mazy <am@osimis.io>
date Thu, 27 Oct 2022 12:53:47 +0200
parents b96aedfa8cc1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4325
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 diff -urEb e2fsprogs-1.44.5.orig/lib/uuid/gen_uuid.c e2fsprogs-1.44.5/lib/uuid/gen_uuid.c
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 --- e2fsprogs-1.44.5.orig/lib/uuid/gen_uuid.c 2020-11-24 15:47:40.950897761 +0100
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 +++ e2fsprogs-1.44.5/lib/uuid/gen_uuid.c 2020-11-24 15:48:51.234732050 +0100
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 @@ -147,12 +147,14 @@
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 fd = open("/dev/urandom", O_RDONLY);
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 if (fd == -1)
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 fd = open("/dev/random", O_RDONLY | O_NONBLOCK);
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 +#if !defined(__EMSCRIPTEN__) // By SJO for Stone
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 if (fd >= 0) {
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 i = fcntl(fd, F_GETFD);
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 if (i >= 0)
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 fcntl(fd, F_SETFD, i | FD_CLOEXEC);
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 }
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 #endif
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 +#endif
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 srand(((unsigned)getpid() << 16) ^ getuid() ^ tv.tv_sec ^ tv.tv_usec);
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 #ifdef DO_JRAND_MIX
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 jrand_seed[0] = getpid() ^ (tv.tv_sec & 0xFFFF);
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 diff -urEb e2fsprogs-1.44.5.orig/lib/uuid/uuid.h.in e2fsprogs-1.44.5/lib/uuid/uuid.h.in
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 --- e2fsprogs-1.44.5.orig/lib/uuid/uuid.h.in 2020-11-24 15:47:40.950897761 +0100
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 +++ e2fsprogs-1.44.5/lib/uuid/uuid.h.in 2020-11-24 15:48:00.946849227 +0100
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 @@ -35,6 +35,20 @@
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 #ifndef _UUID_UUID_H
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #define _UUID_UUID_H
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 +
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 +#if defined(__APPLE__)
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 +// This patch defines the "uuid_string_t" type on OS X, which is
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 +// required if linking against Cocoa (this occurs in Stone of Orthanc)
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 +#include <sys/_types.h>
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 +#include <sys/_types/_uuid_t.h>
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 +
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 +#ifndef _UUID_STRING_T
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 +#define _UUID_STRING_T
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 +typedef __darwin_uuid_string_t uuid_string_t;
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 +#endif /* _UUID_STRING_T */
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 +#endif
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 +
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 +
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 #include <sys/types.h>
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 #ifndef _WIN32
b96aedfa8cc1 unit tests now running in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 #include <sys/time.h>