Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit c7f9a029 authored by Heiko Becker's avatar Heiko Becker 🎸

Define _BSD_SOURCE for strdup and timerclear

Summary:
strdup is an extention to the C standard, timerclear originates from
the BSDs. GNU libc exposes both by default but musl libc requires a
feature flag to get them defined and thus fix libkcompactdisc's
build.

Test Plan: Builds fine with glibc and musl libcs.

Differential Revision: https://phabricator.kde.org/D19615
parent ff7d456b
......@@ -30,6 +30,9 @@
#ifdef HAVE_ALSA
#define _BSD_SOURCE /* strdup */
#define _DEFAULT_SOURCE /* stop glibc whining about the previous line */
#include <alsa/asoundlib.h>
static char *device = NULL;
......
......@@ -24,6 +24,9 @@
* platform- or drive-dependent code here.
*/
#define _BSD_SOURCE /* strdup */
#define _DEFAULT_SOURCE /* stop glibc whining about the previous line */
#include "include/wm_config.h"
#include "include/wm_struct.h"
#include "include/wm_cddb.h"
......
......@@ -23,6 +23,9 @@
*
*/
#define _BSD_SOURCE /* strdup, timerclear */
#define _DEFAULT_SOURCE /* stop glibc whining about the previous line */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment