mirror of
https://github.com/containers/podman.git
synced 2025-05-31 15:42:48 +08:00

move the cgo bits to a separate file to allow building without cgo. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
12 lines
227 B
Go
12 lines
227 B
Go
//+build linux,cgo
|
|
|
|
package libpod
|
|
|
|
//#include <sys/un.h>
|
|
// extern int unix_path_length(){struct sockaddr_un addr; return sizeof(addr.sun_path) - 1;}
|
|
import "C"
|
|
|
|
func unixPathLength() int {
|
|
return int(C.unix_path_length())
|
|
}
|