diff options
author | Takayuki Matsuoka <t-mat@users.noreply.github.com> | 2022-08-07 10:43:54 (GMT) |
---|---|---|
committer | Takayuki Matsuoka <t-mat@users.noreply.github.com> | 2022-08-07 10:43:54 (GMT) |
commit | 431a793b243360bd962e8f6f02884606693b34d9 (patch) | |
tree | 4bde6da3d69498ae648ae1af532b7e7172393968 /tests | |
parent | cdf515c90ff32f681be3ee97e5889f8cdd9ed143 (diff) | |
download | lz4-431a793b243360bd962e8f6f02884606693b34d9.zip lz4-431a793b243360bd962e8f6f02884606693b34d9.tar.gz lz4-431a793b243360bd962e8f6f02884606693b34d9.tar.bz2 |
Fix: implement empty _start and main for non-Linux or x86-64 platforms
Diffstat (limited to 'tests')
-rw-r--r-- | tests/freestanding.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/freestanding.c b/tests/freestanding.c index 6bf2e6d..ceff4c5 100644 --- a/tests/freestanding.c +++ b/tests/freestanding.c @@ -19,10 +19,6 @@ // $ ltrace ./a.out // +++ exited (status 0) +++ -#if !defined(__x86_64__) || !defined(__linux__) -# error This test only supports Linux __x86_64__ -#endif - #include <stddef.h> #include <stdint.h> @@ -33,6 +29,11 @@ #endif +#if !defined(__x86_64__) || !defined(__linux__) +EXTERN_C void _start(void) { } +int main(int argc, char** argv) { return 0; } +#else + static void MY_exit(int exitCode); static void MY_abort(void); EXTERN_C void *memmove(void *dst, const void *src, size_t n); @@ -235,3 +236,4 @@ int main(int argc, char** argv) { MY_exit(0); return 0; } +#endif |