mirror of
https://github.com/containers/podman.git
synced 2025-05-21 09:05:56 +08:00
vendor: update github.com/coreos/go-systemd/v22 to latest main
This fixes a CI flake. go-systemd was not handling the dlerror() function correctly which lead to wrong errors being reported. [NO NEW TESTS NEEDED] Fixes #20569 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
9
vendor/github.com/coreos/go-systemd/v22/internal/dlopen/dlopen.go
generated
vendored
9
vendor/github.com/coreos/go-systemd/v22/internal/dlopen/dlopen.go
generated
vendored
@ -23,6 +23,7 @@ import "C"
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
@ -56,6 +57,10 @@ func GetHandle(libs []string) (*LibHandle, error) {
|
||||
|
||||
// GetSymbolPointer takes a symbol name and returns a pointer to the symbol.
|
||||
func (l *LibHandle) GetSymbolPointer(symbol string) (unsafe.Pointer, error) {
|
||||
// Locking the thread is critical here as the dlerror() is thread local so
|
||||
// go should not reschedule this onto another thread.
|
||||
runtime.LockOSThread()
|
||||
defer runtime.UnlockOSThread()
|
||||
sym := C.CString(symbol)
|
||||
defer C.free(unsafe.Pointer(sym))
|
||||
|
||||
@ -71,6 +76,10 @@ func (l *LibHandle) GetSymbolPointer(symbol string) (unsafe.Pointer, error) {
|
||||
|
||||
// Close closes a LibHandle.
|
||||
func (l *LibHandle) Close() error {
|
||||
// Locking the thread is critical here as the dlerror() is thread local so
|
||||
// go should not reschedule this onto another thread.
|
||||
runtime.LockOSThread()
|
||||
defer runtime.UnlockOSThread()
|
||||
C.dlerror()
|
||||
C.dlclose(l.Handle)
|
||||
e := C.dlerror()
|
||||
|
4
vendor/github.com/coreos/go-systemd/v22/sdjournal/journal.go
generated
vendored
4
vendor/github.com/coreos/go-systemd/v22/sdjournal/journal.go
generated
vendored
@ -59,7 +59,7 @@ package sdjournal
|
||||
// void
|
||||
// my_sd_journal_close(void *f, sd_journal *j)
|
||||
// {
|
||||
// int (*sd_journal_close)(sd_journal *);
|
||||
// void (*sd_journal_close)(sd_journal *);
|
||||
//
|
||||
// sd_journal_close = f;
|
||||
// sd_journal_close(j);
|
||||
@ -104,7 +104,7 @@ package sdjournal
|
||||
// void
|
||||
// my_sd_journal_flush_matches(void *f, sd_journal *j)
|
||||
// {
|
||||
// int (*sd_journal_flush_matches)(sd_journal *);
|
||||
// void (*sd_journal_flush_matches)(sd_journal *);
|
||||
//
|
||||
// sd_journal_flush_matches = f;
|
||||
// sd_journal_flush_matches(j);
|
||||
|
Reference in New Issue
Block a user