File tree 2 files changed +39
-0
lines changed 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ http_archive(
8
8
build_file = "//ml_metadata:postgresql.BUILD" ,
9
9
workspace_file_content = "//ml_metadata:postgresql.WORKSPACE" ,
10
10
sha256 = "9868c1149a04bae1131533c5cbd1c46f9c077f834f6147abaef8791a7c91b1a1" ,
11
+ patches = ["//ml_metadata/third_party:postgresql.patch" ,],
11
12
strip_prefix = "postgresql-12.1" ,
12
13
urls = [
13
14
"https://ftp.postgresql.org/pub/source/v12.1/postgresql-12.1.tar.gz" ,
Original file line number Diff line number Diff line change
1
+ diff --git src/port/pg_bitutils.c src/port/pg_bitutils.c
2
+ index 7847e8a..17714af 100644
3
+ --- src/port/pg_bitutils.c
4
+ +++ src/port/pg_bitutils.c
5
+ @@ -12,12 +12,14 @@
6
+ */
7
+ #include "c.h"
8
+
9
+ + #if !defined(__ppc__) && !defined(__PPC__) && !defined(__ppc64__) && !defined(__PPC64__)
10
+ #ifdef HAVE__GET_CPUID
11
+ #include <cpuid.h>
12
+ #endif
13
+ #ifdef HAVE__CPUID
14
+ #include <intrin.h>
15
+ #endif
16
+ + #endif
17
+
18
+ #include "port/pg_bitutils.h"
19
+
20
+ @@ -141,6 +143,7 @@ int (*pg_popcount64) (uint64 word) = pg_popcount64_slow;
21
+ static bool
22
+ pg_popcount_available(void)
23
+ {
24
+ + #if !defined(__ppc__) && !defined(__PPC__) && !defined(__ppc64__) && !defined(__PPC64__)
25
+ unsigned int exx[4] = {0, 0, 0, 0};
26
+
27
+ #if defined(HAVE__GET_CPUID)
28
+ @@ -152,6 +155,9 @@ pg_popcount_available(void)
29
+ #endif
30
+
31
+ return (exx[2] & (1 << 23)) != 0; /* POPCNT */
32
+ + #else
33
+ + return false;
34
+ + #endif
35
+ }
36
+
37
+ /*
38
+
You can’t perform that action at this time.
0 commit comments