res_search: fix for aarch64
On linux_aarch64 `res_search` is `__res_search@GLIBC_2.17`, which is different from the x86_64 counterpart `__res_search@GLIBC_2.2.5`. Also fix tests.
This commit is contained in:
@@ -6,7 +6,6 @@ go_library(
|
||||
name = "cgo_lib",
|
||||
srcs = ["cgo.go"],
|
||||
cgo = True,
|
||||
clinkopts = ["-lresolv"],
|
||||
importpath = "git.sr.ht/~motiejus/bazel-zig-cc/test/cgo",
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
package main
|
||||
|
||||
// #define _FILE_OFFSET_BITS 64
|
||||
// #include <unistd.h>
|
||||
// #include <fcntl.h>
|
||||
// #include <stdio.h>
|
||||
// #include <resolv.h>
|
||||
// char* hello() { return "hello, world"; }
|
||||
// void phello() { printf("%s, your lucky numbers are %p and %p\n", hello(), fcntl, res_search); }
|
||||
// #cgo LDFLAGS: -lresolv
|
||||
// void phello() { printf("%s\n", hello()); }
|
||||
import "C"
|
||||
|
||||
func main() {
|
||||
|
||||
Reference in New Issue
Block a user