aboutsummaryrefslogtreecommitdiffstats
path: root/src/sink.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sink.c')
-rw-r--r--src/sink.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/sink.c b/src/sink.c
index 3eb44b9a..3fa90e8c 100644
--- a/src/sink.c
+++ b/src/sink.c
@@ -14,14 +14,11 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#define _POSIX_C_SOURCE 201112L /* for posix_memalign */
+#include "serd_internal.h"
#include <stdlib.h>
#include <string.h>
-#include "serd_internal.h"
-#include "serd-config.h"
-
#ifndef MIN
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif
@@ -43,11 +40,7 @@ serd_bulk_sink_new(SerdSink sink, void* stream, size_t block_size)
bsink->stream = stream;
bsink->size = 0;
bsink->block_size = block_size;
-#ifdef HAVE_POSIX_MEMALIGN
- posix_memalign((void**)&bsink->buf, block_size, block_size);
-#else
- bsink->buf = (uint8_t*)malloc(block_size);
-#endif
+ bsink->buf = serd_bufalloc(block_size);
return bsink;
}