1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 02:21:44 +03:00

missing: move resource related definitions to missing_resource.h

This commit is contained in:
Yu Watanabe 2018-12-06 06:36:30 +01:00
parent 0e7117d001
commit 6c76de27ee
3 changed files with 13 additions and 8 deletions

View File

@ -106,6 +106,7 @@ basic_sources = files('''
missing_magic.h
missing_network.h
missing_prctl.h
missing_resource.h
missing_securebits.h
missing_stat.h
missing_syscall.h

View File

@ -8,7 +8,6 @@
#include <inttypes.h>
#include <linux/falloc.h>
#include <stdlib.h>
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/syscall.h>
@ -29,13 +28,6 @@ struct sockaddr_vm {
};
#endif /* !HAVE_LINUX_VM_SOCKETS_H */
#ifndef RLIMIT_RTTIME
#define RLIMIT_RTTIME 15
#endif
/* If RLIMIT_RTTIME is not defined, then we cannot use RLIMIT_NLIMITS as is */
#define _RLIMIT_MAX (RLIMIT_RTTIME+1 > RLIMIT_NLIMITS ? RLIMIT_RTTIME+1 : RLIMIT_NLIMITS)
#ifndef F_LINUX_SPECIFIC_BASE
#define F_LINUX_SPECIFIC_BASE 1024
#endif
@ -266,6 +258,7 @@ struct sockaddr_vm {
#include "missing_magic.h"
#include "missing_network.h"
#include "missing_prctl.h"
#include "missing_resource.h"
#include "missing_type.h"
#include "missing_syscall.h"

View File

@ -0,0 +1,11 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
#include <sys/resource.h>
#ifndef RLIMIT_RTTIME
#define RLIMIT_RTTIME 15
#endif
/* If RLIMIT_RTTIME is not defined, then we cannot use RLIMIT_NLIMITS as is */
#define _RLIMIT_MAX (RLIMIT_RTTIME+1 > RLIMIT_NLIMITS ? RLIMIT_RTTIME+1 : RLIMIT_NLIMITS)