Skip to content

Commit 9f6e5f7

Browse files
committed
fixup! use __attribute__((visibility("default")))
1 parent b862dfa commit 9f6e5f7

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

quickjs.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@
6767
#define CONFIG_ATOMICS
6868
#endif
6969

70+
#if defined(__GNUC__) || defined(__TINYC__)
71+
#define JS_EXTERN __attribute__((visibility("default")))
72+
#else
73+
#define JS_EXTERN
74+
#endif
75+
7076
#ifndef __GNUC__
7177
#define __extension__
7278
#endif
@@ -53574,7 +53580,7 @@ typedef struct JSAtomicsWaiter {
5357453580
} JSAtomicsWaiter;
5357553581

5357653582
static js_once_t js_atomics_once = JS_ONCE_INIT;
53577-
js_mutex_t js_atomics_mutex; // non-static to give run-test262 access
53583+
JS_EXTERN js_mutex_t js_atomics_mutex; // non-static to give run-test262 access
5357853584
static struct list_head js_atomics_waiter_list =
5357953585
LIST_HEAD_INIT(js_atomics_waiter_list);
5358053586

quickjs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
extern "C" {
3737
#endif
3838

39-
#if defined(__GNUC__) || defined(__clang__)
39+
#if defined(__GNUC__) || defined(__TINYC__)
4040
#define js_force_inline inline __attribute__((always_inline))
4141
#define __js_printf_like(f, a) __attribute__((format(printf, f, a)))
4242
#define JS_EXTERN __attribute__((visibility("default")))

0 commit comments

Comments
 (0)