Skip to content

Commit

Permalink
memory: add [[gnu::malloc]] attribute to memalign()
Browse files Browse the repository at this point in the history
Fedora 31's gcc complains that the attributes on
__libc_memalign() don't match memalign()'s, so humor it.
  • Loading branch information
avikivity committed Oct 26, 2019
1 parent 319d359 commit fd11234
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/memory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1588,6 +1588,7 @@ int __libc_posix_memalign(void** ptr, size_t align, size_t size) throw ();

extern "C"
[[gnu::visibility("default")]]
[[gnu::malloc]]
void* memalign(size_t align, size_t size) throw () {
if (try_trigger_error_injector()) {
return nullptr;
Expand Down

0 comments on commit fd11234

Please sign in to comment.