Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
videolan
vlc
Commits
7222ec27
Commit
7222ec27
authored
Mar 01, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix MacOS compilation (probably)
parent
9ae29b39
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
compat/posix_memalign.c
compat/posix_memalign.c
+15
-3
No files found.
compat/posix_memalign.c
View file @
7222ec27
...
@@ -25,9 +25,6 @@
...
@@ -25,9 +25,6 @@
#include <stdlib.h>
#include <stdlib.h>
#include <errno.h>
#include <errno.h>
#ifndef WIN32
#include <malloc.h>
static
int
check_align
(
size_t
align
)
static
int
check_align
(
size_t
align
)
{
{
for
(
size_t
i
=
sizeof
(
void
*
);
i
!=
0
;
i
*=
2
)
for
(
size_t
i
=
sizeof
(
void
*
);
i
!=
0
;
i
*=
2
)
...
@@ -36,6 +33,9 @@ static int check_align (size_t align)
...
@@ -36,6 +33,9 @@ static int check_align (size_t align)
return
EINVAL
;
return
EINVAL
;
}
}
#if !defined (WIN32) && !defined (__APPLE__)
#include <malloc.h>
int
posix_memalign
(
void
**
ptr
,
size_t
align
,
size_t
size
)
int
posix_memalign
(
void
**
ptr
,
size_t
align
,
size_t
size
)
{
{
if
(
check_align
(
align
))
if
(
check_align
(
align
))
...
@@ -52,4 +52,16 @@ int posix_memalign (void **ptr, size_t align, size_t size)
...
@@ -52,4 +52,16 @@ int posix_memalign (void **ptr, size_t align, size_t size)
*
ptr
=
p
;
*
ptr
=
p
;
return
0
;
return
0
;
}
}
#else
int
posix_memalign
(
void
**
ptr
,
size_t
align
,
size_t
size
)
{
if
(
check_align
(
align
))
return
EINVAL
;
*
ptr
=
NULL
;
return
size
?
ENOMEM
:
0
;
}
#endif
#endif
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