Open hshose opened 5 months ago
This seems a problem compiling with flag -std=c99
, when compiling with -std=gnuXX
the macro __USE_XOPEN2K
which enable posix_memalign
declaration, is defined. This is true for both gcc13 and gcc14, there the default for -std
is gnu17
but also older standards have same behaviors.
Anyway I don't think it is a good idea to add _POSIX_C_SOURCE
in a part of the code that is enabled also for system which are potentially not POSIX. If this should work also for -std=cXX
compilation I would suggest to modify blasfeo_malloc
to have the proper macro enabled for the given system.
NB: I don't know why the behavior with -std=c99
changes between gcc13 and gcc14, but I would be happy to find out.
This https://github.com/giaf/blasfeo/commit/01705e58f3cf88138749702e0f72831efb198be8 should make the job by removing any dependency on posix_memalign
Proposed fix for acados issue 1125