Commit a2798b3
committed
fix(port): fix bad reference to 'environ' global
We forward-declare 'environ' on Linux. However, our forward declaration is
inside a namespace, and that seems to cause problems on Arch Linux now:
```
/usr/sbin/ld: ../src/libquick-lint-js-lib.a(child-process.cpp.o): warning: relocation against `_ZN13quick_lint_js12_GLOBAL__N_17environE' in read-only section `.text._ZN13quick_lint_js12_GLOBAL__N_1L21get_posix_environmentEv'
/usr/sbin/ld: ../src/libquick-lint-js-lib.a(child-process.cpp.o): in function `quick_lint_js::(anonymous namespace)::get_posix_environment()':
/__w/quick-lint-js/quick-lint-js/src/quick-lint-js/port/child-process.cpp:364:(.text._ZN13quick_lint_js12_GLOBAL__N_1L21get_posix_environmentEv+0x7): undefined reference to `quick_lint_js::(anonymous namespace)::environ'
/usr/sbin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
```
Fix this issue by moving the forward declaration of 'environ' out of a
namespace.1 parent e285f0e commit a2798b3
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
| |||
353 | 357 | | |
354 | 358 | | |
355 | 359 | | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| |||
0 commit comments