mirror of
https://github.com/clearlinux/graphene.git
synced 2026-10-03 15:39:36 +00:00
Fixing warnings reported by -Wall (#258)
* Fixing warnings reported by -Wall * Adding macros to detect whether EPOLL related macros are defined
This commit is contained in:
@@ -31,8 +31,6 @@
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#warning "be sure before including this file"
|
||||
|
||||
#if !defined(NS) || !defined(NS_CAP)
|
||||
# error "NS or NS_CAP is not defined"
|
||||
#endif
|
||||
@@ -844,6 +842,9 @@ static int connect_ns (IDTYPE * vmid, struct shim_ipc_port ** portptr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Turn off this function as it is not used
|
||||
// Keep the code for future use
|
||||
#if 0
|
||||
static int disconnect_ns(struct shim_ipc_port * port)
|
||||
{
|
||||
lock(cur_process.lock);
|
||||
@@ -855,6 +856,7 @@ static int disconnect_ns(struct shim_ipc_port * port)
|
||||
del_ipc_port(port, IPC_PORT_LDR);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int CONCAT3(prepare, NS, leader) (void)
|
||||
{
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
|
||||
#include <linux/eventpoll.h>
|
||||
|
||||
/* Avoid duplicated definitions */
|
||||
#ifndef EPOLLIN
|
||||
|
||||
#define EPOLLIN 0x001
|
||||
#define EPOLLPRI 0x002
|
||||
#define EPOLLOUT 0x004
|
||||
@@ -49,6 +52,8 @@
|
||||
#define EPOLLHUP 0x010
|
||||
#define EPOLLRDHUP 0x2000
|
||||
|
||||
#endif
|
||||
|
||||
#define MAX_EPOLL_FDS 1024
|
||||
|
||||
struct shim_mount epoll_builtin_fs;
|
||||
|
||||
Reference in New Issue
Block a user