Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
ded614d7
Commit
ded614d7
authored
Jun 14, 2017
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-12778 mariadb-10.1 FTBFS on GNU/Hurd due to use of PATH_MAX
parent
48429359
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
mysys/my_symlink.c
mysys/my_symlink.c
+1
-1
mysys/mysys_priv.h
mysys/mysys_priv.h
+10
-1
No files found.
mysys/my_symlink.c
View file @
ded614d7
...
@@ -197,7 +197,7 @@ int my_realpath(char *to, const char *filename, myf MyFlags)
...
@@ -197,7 +197,7 @@ int my_realpath(char *to, const char *filename, myf MyFlags)
const
char
*
my_open_parent_dir_nosymlinks
(
const
char
*
pathname
,
int
*
pdfd
)
const
char
*
my_open_parent_dir_nosymlinks
(
const
char
*
pathname
,
int
*
pdfd
)
{
{
char
buf
[
PATH_MAX
+
1
];
char
buf
[
FN_REFLEN
+
1
];
char
*
s
=
buf
,
*
e
=
buf
+
1
,
*
end
=
strnmov
(
buf
,
pathname
,
sizeof
(
buf
));
char
*
s
=
buf
,
*
e
=
buf
+
1
,
*
end
=
strnmov
(
buf
,
pathname
,
sizeof
(
buf
));
int
fd
,
dfd
=
-
1
;
int
fd
,
dfd
=
-
1
;
...
...
mysys/mysys_priv.h
View file @
ded614d7
...
@@ -107,12 +107,21 @@ const char *my_open_parent_dir_nosymlinks(const char *pathname, int *pdfd);
...
@@ -107,12 +107,21 @@ const char *my_open_parent_dir_nosymlinks(const char *pathname, int *pdfd);
res= AT; \
res= AT; \
if (dfd >= 0) close(dfd); \
if (dfd >= 0) close(dfd); \
return res;
return res;
#elif defined(HAVE_REALPATH)
#elif defined(HAVE_REALPATH)
&& defined(PATH_MAX)
#define NOSYMLINK_FUNCTION_BODY(AT,NOAT) \
#define NOSYMLINK_FUNCTION_BODY(AT,NOAT) \
char buf[PATH_MAX+1]; \
char buf[PATH_MAX+1]; \
if (realpath(pathname, buf) == NULL) return -1; \
if (realpath(pathname, buf) == NULL) return -1; \
if (strcmp(pathname, buf)) { errno= ENOTDIR; return -1; } \
if (strcmp(pathname, buf)) { errno= ENOTDIR; return -1; } \
return NOAT;
return NOAT;
#elif defined(HAVE_REALPATH)
#define NOSYMLINK_FUNCTION_BODY(AT,NOAT) \
char *buf= realpath(pathname, NULL); \
int res; \
if (buf == NULL) return -1; \
if (strcmp(pathname, buf)) { errno= ENOTDIR; res= -1; } \
else res= NOAT; \
free(buf); \
return res;
#else
#else
#define NOSYMLINK_FUNCTION_BODY(AT,NOAT) \
#define NOSYMLINK_FUNCTION_BODY(AT,NOAT) \
return NOAT;
return NOAT;
...
...
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