Skip to content

Commit

Permalink
internal/dlsym: Define _GNU_SOURCE for RTLD_DEFAULT
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
anoopcs9 authored and mergify[bot] committed Sep 25, 2024
1 parent 5a7f9c9 commit 065319c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/dlsym/dlsym.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 065319c

Please sign in to comment.