diff --git a/Makefile b/Makefile index 4f76af054..217790492 100644 --- a/Makefile +++ b/Makefile @@ -214,7 +214,7 @@ endif EE_CFLAGS += -fsingle-precision-constant -DOPL_VERSION=\"$(OPL_VERSION)\" # There are a few places where the config key/value are truncated, so disable these warnings -EE_CFLAGS += -Wno-format-truncation -Wno-stringop-truncation +EE_CFLAGS += -Wno-format-truncation -Wno-stringop-truncation -std=gnu11 # Generate .d files to track header file dependencies of each object file EE_CFLAGS += -MMD -MP EE_OBJS += $(FRONTEND_OBJS) $(GFX_OBJS) $(AUDIO_OBJS) $(MISC_OBJS) $(EECORE_OBJS) $(IOP_OBJS) diff --git a/src/atlas.c b/src/atlas.c index e68136059..ef7e52d33 100644 --- a/src/atlas.c +++ b/src/atlas.c @@ -95,7 +95,7 @@ atlas_t *atlasNew(size_t width, size_t height, u8 psm) size_t txtsize = gsKit_texture_size(width, height, psm); atlas->surface.PSM = psm; - atlas->surface.Mem = (u32 *)memalign(128, txtsize); + atlas->surface.Mem = (u32 *)aligned_alloc(128, txtsize); atlas->surface.Vram = 0; // defaults to no clut diff --git a/src/opl.c b/src/opl.c index cd6098353..272164ae1 100644 --- a/src/opl.c +++ b/src/opl.c @@ -1275,7 +1275,7 @@ static void compatUpdate(item_list_t *support, unsigned char mode, config_set_t result = 0; LOG("CompatUpdate: updating for: device %d game %d\n", device, configSet == NULL ? -1 : id); - if ((HttpBuffer = memalign(64, HTTP_IOBUF_SIZE)) != NULL) { + if ((HttpBuffer = aligned_alloc(64, HTTP_IOBUF_SIZE)) != NULL) { count = configSet != NULL ? 1 : support->itemGetCount(support); if (count > 0) { diff --git a/src/util.c b/src/util.c index 1a2d51edf..564874a00 100644 --- a/src/util.c +++ b/src/util.c @@ -194,7 +194,7 @@ void *readFile(char *path, int align, int *size) } if (align > 0) - buffer = memalign(64, realSize); // The allocation is aligned to aid the DMA transfers + buffer = aligned_alloc(64, realSize); // The allocation is aligned to aid the DMA transfers else buffer = malloc(realSize);