Commit 5ab8f14
network: fix strerror_r detection for musl
/home/thomas/br-test-pkg/bootlin-armv7-musl/build/fluent-bit-4.0.8/src/flb_network.c: In function ‘net_connect_async’:
/home/thomas/br-test-pkg/bootlin-armv7-musl/build/fluent-bit-4.0.8/src/flb_network.c:653:17: error: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
653 | str = strerror_r(error, so_error_buf, sizeof(so_error_buf));
| ^
This fix should work perfectly for:
glibc systems: Uses str = strerror_r(...) (GNU version)
musl systems: Uses ret = strerror_r(...); if (ret == 0) str = so_error_buf; (POSIX version)
Other libc implementations: Defaults to POSIX behavior
Fix is similar to janet-lang/janet@a5d6b22.
Signed-off-by: Thomas Devoogdt <[email protected]>1 parent 567ce06 commit 5ab8f14
1 file changed
+3
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
641 | | - | |
642 | | - | |
643 | | - | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
| |||
649 | 649 | | |
650 | 650 | | |
651 | 651 | | |
652 | | - | |
653 | | - | |
654 | 652 | | |
655 | 653 | | |
656 | 654 | | |
| |||
0 commit comments