Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
8718146c
Unverified
Commit
8718146c
authored
Oct 03, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
syscall_wrappers: move sethostname()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
8cb8f970
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
syscall_wrappers.h
src/lxc/syscall_wrappers.h
+13
-0
utils.h
src/lxc/utils.h
+0
-13
No files found.
src/lxc/syscall_wrappers.h
View file @
8718146c
...
@@ -127,6 +127,19 @@ extern int pivot_root(const char *new_root, const char *put_old);
...
@@ -127,6 +127,19 @@ extern int pivot_root(const char *new_root, const char *put_old);
#endif
#endif
#endif
#endif
/* Define sethostname() if missing from the C library */
#ifndef HAVE_SETHOSTNAME
static
inline
int
sethostname
(
const
char
*
name
,
size_t
len
)
{
#ifdef __NR_sethostname
return
syscall
(
__NR_sethostname
,
name
,
len
);
#else
errno
=
ENOSYS
;
return
-
1
;
#endif
}
#endif
/* Define setns() if missing from the C library */
/* Define setns() if missing from the C library */
#ifndef HAVE_SETNS
#ifndef HAVE_SETNS
static
inline
int
setns
(
int
fd
,
int
nstype
)
static
inline
int
setns
(
int
fd
,
int
nstype
)
...
...
src/lxc/utils.h
View file @
8718146c
...
@@ -56,19 +56,6 @@ extern char *get_rundir(void);
...
@@ -56,19 +56,6 @@ extern char *get_rundir(void);
#endif
#endif
#endif
#endif
/* Define sethostname() if missing from the C library */
#ifndef HAVE_SETHOSTNAME
static
inline
int
sethostname
(
const
char
*
name
,
size_t
len
)
{
#ifdef __NR_sethostname
return
syscall
(
__NR_sethostname
,
name
,
len
);
#else
errno
=
ENOSYS
;
return
-
1
;
#endif
}
#endif
/* Define unshare() if missing from the C library */
/* Define unshare() if missing from the C library */
#ifndef HAVE_UNSHARE
#ifndef HAVE_UNSHARE
static
inline
int
unshare
(
int
flags
)
static
inline
int
unshare
(
int
flags
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment