internal/dlsym: Define _GNU_SOURCE for RTLD_DEFAULT

man dlsym(3) says the following:
. . .
The _GNU_SOURCE feature test macro must be defined in order to obtain
the definitions of RTLD_DEFAULT and RTLD_NEXT from <dlfcn.h>.
. . .

Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
This commit is contained in:
Anoop C S 2024-09-12 16:33:25 +05:30 committed by mergify[bot]
parent 5a7f9c9050
commit 065319c787

View File

@ -2,12 +2,10 @@ package dlsym
// #cgo LDFLAGS: -ldl
//
// #define _GNU_SOURCE
//
// #include <stdlib.h>
// #include <dlfcn.h>
//
// #ifndef RTLD_DEFAULT /* from dlfcn.h */
// #define RTLD_DEFAULT ((void *) 0)
// #endif
import "C"
import (