Skip to content

Commit

Permalink
Only define _POSIX_C_SOURCE if it is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
grassator committed Dec 28, 2021
1 parent 3f29eee commit aec2afa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bdd-for-c.h
Expand Up @@ -31,8 +31,10 @@ SOFTWARE.
#include <io.h>
#define __BDD_IS_ATTY__() _isatty(_fileno(stdout))
#else
// This definition is required for `fileno` to be defined
#define _POSIX_C_SOURCE 1
#ifndef _POSIX_C_SOURCE
// This definition is required for `fileno` to be defined
#define _POSIX_C_SOURCE 200809
#endif
#include <stdio.h>
#include <unistd.h>
#include <term.h>
Expand Down

0 comments on commit aec2afa

Please sign in to comment.