diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-04-28 20:24:40 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-04-28 20:24:40 +0000 |
commit | b93cfe6eef4f9f855770b410ee7605c010378c78 (patch) | |
tree | 394819776819b6eb8804939c051c1f6b700ace73 | |
parent | d5f0902efb22113e14f49ea2e870e866cb72ae66 (diff) | |
parent | a373f23216120dfa63ec6613ec99639880e35505 (diff) | |
download | kmod-android10-mainline-tzdata-release.tar.gz |
Snap for 6439596 from a373f23216120dfa63ec6613ec99639880e35505 to qt-aml-tzdata-releaseq_tzdata_aml_297100400q_tzdata_aml_297100300q_tzdata_aml_297100000q_tzdata_aml_296200000q_tzdata_aml_295600118q_tzdata_aml_295600110q_tzdata_aml_295500002q_tzdata_aml_295500001q_tzdata_aml_294400310android-mainline-12.0.0_r54android-mainline-12.0.0_r111android-mainline-10.0.0_r13android-mainline-10.0.0_r12android-mainline-10.0.0_r11q_tzdata_aml_297100000android12-mainline-tzdata-releaseandroid10-mainline-tzdata-releaseandroid10-android13-mainline-tzdata-release
Change-Id: I9bdcfbfec271757464363062e1d33edfc3ecfae3
-rw-r--r-- | Android.bp | 56 | ||||
-rw-r--r-- | port-gnu/config.h | 11 | ||||
-rw-r--r-- | shared/missing.h | 2 |
3 files changed, 20 insertions, 49 deletions
@@ -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); \ |