Skip to content

Commit 2efaf48

Browse files
committed
Work in Progress
Signed-off-by: Yong Tang <[email protected]>
1 parent 1fff7ea commit 2efaf48

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

third_party/libapr1.BUILD

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,14 @@ cc_library(
152152
],
153153
copts = [
154154
"-pthread",
155-
],
155+
] + select({
156+
"@bazel_tools//src/conditions:darwin": [
157+
"-DAPR_HAVE_UNION_SEMUN=1",
158+
],
159+
"//conditions:default": [
160+
"-DAPR_HAVE_UNION_SEMUN=0",
161+
],
162+
}),
156163
defines = [
157164
"_GNU_SOURCE",
158165
"HAVE_CONFIG_H",
@@ -165,8 +172,6 @@ cc_library(
165172
"include/private",
166173
],
167174
linkopts = [
168-
"-lrt",
169-
"-lcrypt",
170175
"-lpthread",
171176
"-ldl",
172177
],

third_party/libapr1.patch

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -264,14 +264,14 @@ diff -urN libapr1/include/apr.h libapr/include/apr.h
264264
+#define APR_HAVE_STRSTR 1
265265
+#define APR_HAVE_MEMCHR 1
266266
+#define APR_HAVE_STRUCT_RLIMIT 1
267-
+#define APR_HAVE_UNION_SEMUN 0
267+
+/* #define APR_HAVE_UNION_SEMUN 1 */
268268
+#define APR_HAVE_SCTP 0
269269
+#define APR_HAVE_IOVEC 1
270270
+
271271
+/* APR Feature Macros */
272272
+#define APR_HAS_SHARED_MEMORY 1
273273
+#define APR_HAS_THREADS 1
274-
+#define APR_HAS_SENDFILE 1
274+
+/* #define APR_HAS_SENDFILE 1 */
275275
+#define APR_HAS_MMAP 1
276276
+#define APR_HAS_FORK 1
277277
+#define APR_HAS_RANDOM 1
@@ -734,7 +734,7 @@ diff -urN libapr1/include/arch/unix/apr_private.h libapr/include/arch/unix/apr_p
734734
+/* #undef GETSERVBYNAME_R_SOLARIS */
735735
+
736736
+/* Define if accept4 function is supported */
737-
+#define HAVE_ACCEPT4 1
737+
+/* #undef HAVE_ACCEPT4 */
738738
+
739739
+/* Define if async i/o supports message q's */
740740
+/* #undef HAVE_AIO_MSGQ */
@@ -793,7 +793,7 @@ diff -urN libapr1/include/arch/unix/apr_private.h libapr/include/arch/unix/apr_p
793793
+/* #undef HAVE_DL_H */
794794
+
795795
+/* Define if dup3 function is supported */
796-
+#define HAVE_DUP3 1
796+
+/* #undef HAVE_DUP3 */
797797
+
798798
+/* Define if EGD is supported */
799799
+/* #undef HAVE_EGD */
@@ -868,7 +868,7 @@ diff -urN libapr1/include/arch/unix/apr_private.h libapr/include/arch/unix/apr_p
868868
+#define HAVE_GETRLIMIT 1
869869
+
870870
+/* Define to 1 if you have the `getservbyname_r' function. */
871-
+#define HAVE_GETSERVBYNAME_R 1
871+
+/* #undef HAVE_GETSERVBYNAME_R */
872872
+
873873
+/* Define to 1 if you have the `gmtime_r' function. */
874874
+#define HAVE_GMTIME_R 1
@@ -1021,7 +1021,7 @@ diff -urN libapr1/include/arch/unix/apr_private.h libapr/include/arch/unix/apr_p
10211021
+#define HAVE_PTHREAD_MUTEX_RECURSIVE 1
10221022
+
10231023
+/* Define if cross-process robust mutexes are available */
1024-
+#define HAVE_PTHREAD_MUTEX_ROBUST 1
1024+
+/* #undef HAVE_PTHREAD_MUTEX_ROBUST */
10251025
+
10261026
+/* Define if PTHREAD_PROCESS_SHARED is defined in pthread.h */
10271027
+#define HAVE_PTHREAD_PROCESS_SHARED 1
@@ -1033,7 +1033,7 @@ diff -urN libapr1/include/arch/unix/apr_private.h libapr/include/arch/unix/apr_p
10331033
+#define HAVE_PTHREAD_RWLOCK_INIT 1
10341034
+
10351035
+/* Define to 1 if you have the `pthread_yield' function. */
1036-
+#define HAVE_PTHREAD_YIELD 1
1036+
+/* #undef HAVE_PTHREAD_YIELD */
10371037
+
10381038
+/* Define to 1 if you have the `putenv' function. */
10391039
+#define HAVE_PUTENV 1
@@ -1135,7 +1135,7 @@ diff -urN libapr1/include/arch/unix/apr_private.h libapr/include/arch/unix/apr_p
11351135
+#define HAVE_SOCKLEN_T 1
11361136
+
11371137
+/* Define if the SOCK_CLOEXEC flag is supported */
1138-
+#define HAVE_SOCK_CLOEXEC 1
1138+
+/* #undef HAVE_SOCK_CLOEXEC */
11391139
+
11401140
+/* Define if SO_ACCEPTFILTER is defined in sys/socket.h */
11411141
+/* #undef HAVE_SO_ACCEPTFILTER */

third_party/libaprutil1.BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ cc_library(
111111
"include/private",
112112
],
113113
linkopts = [
114-
"-lrt",
115114
"-lpthread",
116115
],
117116
strip_include_prefix = "include",

0 commit comments

Comments
 (0)