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
2e6e3feb
Unverified
Commit
2e6e3feb
authored
Apr 24, 2017
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
confile: fix musl build
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
2e2cbfd2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
confile.c
src/lxc/confile.c
+4
-2
No files found.
src/lxc/confile.c
View file @
2e6e3feb
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
*/
#define _GNU_SOURCE
#define _GNU_SOURCE
#define __STDC_FORMAT_MACROS
/* Required for PRIu64 to work. */
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
...
@@ -28,6 +29,7 @@
...
@@ -28,6 +29,7 @@
#include <errno.h>
#include <errno.h>
#include <fcntl.h>
#include <fcntl.h>
#include <ctype.h>
#include <ctype.h>
#include <inttypes.h>
/* Required for PRIu64 to work. */
#include <signal.h>
#include <signal.h>
#include <sys/stat.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/types.h>
...
@@ -2448,13 +2450,13 @@ static int lxc_get_limit_entry(struct lxc_conf *c, char *retv, int inlen,
...
@@ -2448,13 +2450,13 @@ static int lxc_get_limit_entry(struct lxc_conf *c, char *retv, int inlen,
memcpy
(
buf
,
"unlimited"
,
sizeof
(
"unlimited"
));
memcpy
(
buf
,
"unlimited"
,
sizeof
(
"unlimited"
));
partlen
=
sizeof
(
"unlimited"
)
-
1
;
partlen
=
sizeof
(
"unlimited"
)
-
1
;
}
else
{
}
else
{
partlen
=
sprintf
(
buf
,
"%
lu"
,
lim
->
limit
.
rlim_cur
);
partlen
=
sprintf
(
buf
,
"%
"
PRIu64
,
(
uint64_t
)
lim
->
limit
.
rlim_cur
);
}
}
if
(
lim
->
limit
.
rlim_cur
!=
lim
->
limit
.
rlim_max
)
{
if
(
lim
->
limit
.
rlim_cur
!=
lim
->
limit
.
rlim_max
)
{
if
(
lim
->
limit
.
rlim_max
==
RLIM_INFINITY
)
{
if
(
lim
->
limit
.
rlim_max
==
RLIM_INFINITY
)
{
memcpy
(
buf
+
partlen
,
":unlimited"
,
sizeof
(
":unlimited"
));
memcpy
(
buf
+
partlen
,
":unlimited"
,
sizeof
(
":unlimited"
));
}
else
{
}
else
{
sprintf
(
buf
+
partlen
,
":%
lu"
,
lim
->
limit
.
rlim_max
);
sprintf
(
buf
+
partlen
,
":%
"
PRIu64
,
(
uint64_t
)
lim
->
limit
.
rlim_max
);
}
}
}
}
...
...
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