From 23eb8e93efeb1d42fbb4e1a4cbed5c332d29a334 Mon Sep 17 00:00:00 2001 From: Julien Portalier Date: Thu, 3 Oct 2024 16:21:45 +0200 Subject: [PATCH] fixup! Add C bindings for getrlimit(RLIMIT_NOFILE) --- src/lib_c/aarch64-linux-musl/c/sys/resource.cr | 13 ++----------- src/lib_c/i386-linux-musl/c/sys/resource.cr | 13 ++----------- src/lib_c/x86_64-linux-musl/c/sys/resource.cr | 13 ++----------- 3 files changed, 6 insertions(+), 33 deletions(-) diff --git a/src/lib_c/aarch64-linux-musl/c/sys/resource.cr b/src/lib_c/aarch64-linux-musl/c/sys/resource.cr index b0b1dc6ec2b2..656e43cb0379 100644 --- a/src/lib_c/aarch64-linux-musl/c/sys/resource.cr +++ b/src/lib_c/aarch64-linux-musl/c/sys/resource.cr @@ -6,6 +6,8 @@ lib LibC rlim_max : RlimT end + RLIMIT_NOFILE = 7 + fun getrlimit(Int, Rlimit*) : Int RLIMIT_STACK = 3 @@ -33,15 +35,4 @@ lib LibC RUSAGE_CHILDREN = -1 fun getrusage(who : Int, usage : RUsage*) : Int16 - - alias RlimT = ULongLong - - struct Rlimit - rlim_cur : RlimT - rlim_max : RlimT - end - - RLIMIT_NOFILE = 7 - - fun getrlimit(resource : Int, rlim : Rlimit*) : Int end diff --git a/src/lib_c/i386-linux-musl/c/sys/resource.cr b/src/lib_c/i386-linux-musl/c/sys/resource.cr index b0b1dc6ec2b2..656e43cb0379 100644 --- a/src/lib_c/i386-linux-musl/c/sys/resource.cr +++ b/src/lib_c/i386-linux-musl/c/sys/resource.cr @@ -6,6 +6,8 @@ lib LibC rlim_max : RlimT end + RLIMIT_NOFILE = 7 + fun getrlimit(Int, Rlimit*) : Int RLIMIT_STACK = 3 @@ -33,15 +35,4 @@ lib LibC RUSAGE_CHILDREN = -1 fun getrusage(who : Int, usage : RUsage*) : Int16 - - alias RlimT = ULongLong - - struct Rlimit - rlim_cur : RlimT - rlim_max : RlimT - end - - RLIMIT_NOFILE = 7 - - fun getrlimit(resource : Int, rlim : Rlimit*) : Int end diff --git a/src/lib_c/x86_64-linux-musl/c/sys/resource.cr b/src/lib_c/x86_64-linux-musl/c/sys/resource.cr index b0b1dc6ec2b2..656e43cb0379 100644 --- a/src/lib_c/x86_64-linux-musl/c/sys/resource.cr +++ b/src/lib_c/x86_64-linux-musl/c/sys/resource.cr @@ -6,6 +6,8 @@ lib LibC rlim_max : RlimT end + RLIMIT_NOFILE = 7 + fun getrlimit(Int, Rlimit*) : Int RLIMIT_STACK = 3 @@ -33,15 +35,4 @@ lib LibC RUSAGE_CHILDREN = -1 fun getrusage(who : Int, usage : RUsage*) : Int16 - - alias RlimT = ULongLong - - struct Rlimit - rlim_cur : RlimT - rlim_max : RlimT - end - - RLIMIT_NOFILE = 7 - - fun getrlimit(resource : Int, rlim : Rlimit*) : Int end