aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-04-28 20:24:40 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-04-28 20:24:40 +0000
commitb93cfe6eef4f9f855770b410ee7605c010378c78 (patch)
tree394819776819b6eb8804939c051c1f6b700ace73
parentd5f0902efb22113e14f49ea2e870e866cb72ae66 (diff)
parenta373f23216120dfa63ec6613ec99639880e35505 (diff)
downloadkmod-android10-mainline-tzdata-release.tar.gz
Change-Id: I9bdcfbfec271757464363062e1d33edfc3ecfae3
-rw-r--r--Android.bp56
-rw-r--r--port-gnu/config.h11
-rw-r--r--shared/missing.h2
3 files changed, 20 insertions, 49 deletions
diff --git a/Android.bp b/Android.bp
index 2ebdd16..9ef1efb 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,32 +1,4 @@
-cc_defaults {
- name: "libkmod_cflags_common",
- local_include_dirs: ["port-gnu"],
- cflags: [
- "-include config.h",
- "-ffunction-sections",
- "-fdata-sections",
- "-Wall",
- "-Werror",
- "-Wno-format",
- "-Wno-unused-parameter",
- "-Wno-unused-variable",
- "-Dsecure_getenv=getenv",
- "-DHAVE_CONFIG_H",
- "-DANOTHER_BRICK_IN_THE",
- "-DSYSCONFDIR=\"/tmp\"",
- ],
- target: {
- linux_glibc: {
- cflags: ["-DHAVE_DECL_STRNDUPA"]
- }
- }
-}
-
-cc_library_static {
- defaults: ["libkmod_cflags_common"],
- export_include_dirs: ["libkmod"],
- host_supported: true,
- name: "libkmod",
+cc_binary_host {
srcs: [
"libkmod/libkmod.c",
"libkmod/libkmod-file.c",
@@ -41,14 +13,6 @@ cc_library_static {
"shared/util.c",
"shared/hash.c",
"shared/strbuf.c",
- ],
- visibility: ["//external/igt-gpu-tools"],
-}
-
-cc_binary_host {
- defaults: ["libkmod_cflags_common"],
- name: "depmod",
- srcs: [
"tools/port.c",
"tools/depmod.c",
"tools/kmod.c",
@@ -62,5 +26,21 @@ cc_binary_host {
"tools/lsmod.c",
"tools/remove.c",
],
- static_libs: ["libkmod"],
+
+ name: "depmod",
+ local_include_dirs: ["port-gnu"],
+ cflags: [
+ "-include config.h",
+ "-ffunction-sections",
+ "-fdata-sections",
+ "-Wall",
+ "-Werror",
+ "-Wno-format",
+ "-Wno-unused-parameter",
+ "-Wno-unused-variable",
+ "-Dsecure_getenv=getenv",
+ "-DHAVE_CONFIG_H",
+ "-DANOTHER_BRICK_IN_THE",
+ "-DSYSCONFDIR=\"/tmp\"",
+ ],
}
diff --git a/port-gnu/config.h b/port-gnu/config.h
index eb4ce84..8f527cb 100644
--- a/port-gnu/config.h
+++ b/port-gnu/config.h
@@ -22,7 +22,7 @@
/* Define to 1 if you have the declaration of `strndupa', and to 0 if you
don't. */
-/* #define HAVE_DECL_STRNDUPA */
+#define HAVE_DECL_STRNDUPA 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
@@ -181,12 +181,3 @@ char* basename(const char*);
#include <endian.h>
#endif
-
-#if defined(__ANDROID__)
-#include <stdlib.h>
-#include <unistd.h>
-static inline char *get_current_dir_name(void)
-{
- return getcwd(malloc(PATH_MAX), PATH_MAX);
-}
-#endif
diff --git a/shared/missing.h b/shared/missing.h
index 72aaa95..4c0d136 100644
--- a/shared/missing.h
+++ b/shared/missing.h
@@ -33,7 +33,7 @@ static inline int finit_module(int fd, const char *uargs, int flags)
}
#endif
-#if (!HAVE_DECL_STRNDUPA && !defined(__APPLE__))
+#if !HAVE_DECL_STRNDUPA
#define strndupa(s, n) \
({ \
const char *__old = (s); \