Skip to content

Commit

Permalink
Fixed issue of redefination warning messages for _GNU_SOURCE
Browse files Browse the repository at this point in the history
Signed-off-by: nilesh.kale <[email protected]>
  • Loading branch information
nileshkale123 committed Apr 18, 2024
1 parent bee9656 commit 6e07213
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix
* Fix issue of redefination warning messages for _GNU_SOURCE in
entropy_poll.c and sha_256.c. There was build warnng during
building for linux platform.
Resolves #9026
4 changes: 3 additions & 1 deletion library/entropy_poll.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
*/

#if defined(__linux__) || defined(__midipix__) && !defined(_GNU_SOURCE)
#if defined(__linux__) || defined(__midipix__)
/* Ensure that syscall() is available even when compiling with -std=c99 */
#if !defined(_GNU_SOURCE)
#define _GNU_SOURCE
#endif
#endif

#include "common.h"

Expand Down
2 changes: 2 additions & 0 deletions library/sha256.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
#endif /* defined(__clang__) && (__clang_major__ >= 4) */

/* Ensure that SIG_SETMASK is defined when -std=c99 is used. */
#if !defined(_GNU_SOURCE)
#define _GNU_SOURCE
#endif

#include "common.h"

Expand Down

0 comments on commit 6e07213

Please sign in to comment.