Fix compilation on newer Linux systems

Defining _GNU_SOURCE will set the appropriate POSIX levels required to
use the `_MAX`, `kill`, `realpath`, etc, set of POSIX family functions
and defines.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
This commit is contained in:
Ikey Doherty 2018-01-15 12:48:18 +00:00 committed by Marc Di Luzio
parent cc931a6237
commit 400dcb9c53
4 changed files with 14 additions and 0 deletions

View File

@ -28,10 +28,14 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
#define _GNU_SOURCE
#include "logging.h"
#include <ctype.h>
#include <dirent.h>
#include <linux/limits.h>
#include <sys/types.h>
#define MAX_GOVERNORS 128

View File

@ -28,6 +28,9 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
#define _GNU_SOURCE
#include "gamemode.h"
#include "governors.h"
#include "logging.h"

View File

@ -28,6 +28,9 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
#define _GNU_SOURCE
#include "governors.h"
#include "logging.h"

View File

@ -28,7 +28,11 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Simple daemon to allow user space programs to control the CPU governors
#define _GNU_SOURCE
#include "daemonize.h"
#include "dbus_messaging.h"
#include "gamemode.h"