diff --git a/0015-place-__attribute__-after-struct.patch b/0015-place-__attribute__-after-struct.patch new file mode 100644 index 0000000000000000000000000000000000000000..d6dd10c7583c7d8381d790f064c31f25e15d1ee8 --- /dev/null +++ b/0015-place-__attribute__-after-struct.patch @@ -0,0 +1,76 @@ +From 753f99be08f86b7ef4ff21b61ade537ca260058c Mon Sep 17 00:00:00 2001 +From: yuncang123 <1050706328@qq.com> +Date: Fri, 9 Aug 2024 22:54:14 +0800 +Subject: [PATCH] place __attribute__ after struct + +--- + src/runtime/lcrcontainer.h | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/src/runtime/lcrcontainer.h b/src/runtime/lcrcontainer.h +index d4cef39..6baa540 100644 +--- a/src/runtime/lcrcontainer.h ++++ b/src/runtime/lcrcontainer.h +@@ -40,13 +40,13 @@ extern "C" { + + /* define console log config */ + +-__EXPORT__ struct lcr_console_config { ++struct __EXPORT__ lcr_console_config { + char *log_path; + unsigned int log_rotate; + char *log_file_size; + }; + +-__EXPORT__ struct blkio_stats { ++struct __EXPORT__ blkio_stats { + uint64_t read; + uint64_t write; + uint64_t total; +@@ -55,7 +55,7 @@ __EXPORT__ struct blkio_stats { + /* + * Store lcr container state + */ +-__EXPORT__ struct lcr_container_state { ++struct __EXPORT__ lcr_container_state { + /* Name of container */ + char *name; + /* State of container */ +@@ -92,14 +92,14 @@ typedef enum { + lcr_msg_exit_code, + } lcr_msg_type_t; + +-__EXPORT__ struct lcr_msg { ++struct __EXPORT__ lcr_msg { + lcr_msg_type_t type; + char name[NAME_MAX + 1]; + int value; + int pid; + }; + +-__EXPORT__ struct lcr_cgroup_resources { ++struct __EXPORT__ lcr_cgroup_resources { + uint64_t blkio_weight; + uint64_t cpu_shares; + uint64_t cpu_period; +@@ -150,7 +150,7 @@ __EXPORT__ bool lcr_create(const char *name, const char *lcrpath, void *oci_conf + * gid : user in which group + * additional_gids : Add additional groups to join + */ +-__EXPORT__ struct lcr_start_request { ++struct __EXPORT__ lcr_start_request { + const char *name; + const char *lcrpath; + +@@ -237,7 +237,7 @@ __EXPORT__ void lcr_free_console_config(struct lcr_console_config *config); + __EXPORT__ int lcr_log_init(const char *name, const char *file, const char *priority, + const char *prefix, int quiet, const char *lcrpath); + +-__EXPORT__ struct lcr_exec_request { ++struct __EXPORT__ lcr_exec_request { + const char *name; + const char *lcrpath; + +-- +2.43.0 + diff --git a/lcr.spec b/lcr.spec index 10dafe16d95cc711ba4ce18e65116d3d45e423f8..39cac606f745c135877d7f25896143c11d41dfea 100644 --- a/lcr.spec +++ b/lcr.spec @@ -1,5 +1,5 @@ %global _version 2.1.4 -%global _release 8 +%global _release 9 %global _inner_name isula_libutils %global enable_lxc 1 @@ -27,6 +27,7 @@ Patch0011: 0011-remove-lcr-created-spec-only-if-create-failed.patch Patch0012: 0012-Fix-info-inproper-data-type-for-timestamp.patch Patch0013: 0013-fix-bug-for-potential-config-seccomp-ocihook-write-e.patch Patch0014: 0014-add-codecheck-fix.patch +Patch0015: 0015-place-__attribute__-after-struct.patch %define lxcver_lower 4.0.3-2022102400 %define lxcver_upper 5.0.3 @@ -80,6 +81,7 @@ mkdir -p build cd build %if "%toolchain" == "clang" %global cmake_opts -DCMAKE_C_FLAGS="${CFLAGS}" +CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument" %endif %if 0%{?enable_lxc} @@ -147,7 +149,13 @@ rm -rf %{buildroot} %{_includedir}/lcr/utils_compile.h %changelog -* Tue June 11 2024 jikai - 2.1.4-8 +* Sat Aug 10 2024 yuanchao<1050706328@qq.com> - 2.1.4-9 +- Type:enhancement +- CVE:NA +- SUG:NA +- DESC:support clang build + +* Tue Jun 11 2024 jikai - 2.1.4-8 - Type:enhancement - CVE:NA - SUG:NA