diff --git a/meta/recipes-kernel/systemtap/systemtap/systemtap-_BSD_SOURCE.patch b/meta/recipes-kernel/systemtap/systemtap/systemtap-_BSD_SOURCE.patch
new file mode 100644
index 0000000..62afbd2
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/systemtap-_BSD_SOURCE.patch
@@ -0,0 +1,27 @@
+diff --git a/staprun/staprun.c b/staprun/staprun.c
+index e4ced77..1db6f5b 100644
+--- a/staprun/staprun.c
++++ b/staprun/staprun.c
+@@ -13,21 +13,21 @@
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+ #define _XOPEN_SOURCE
+-#define _BSD_SOURCE
++#define _DEFAULT_SOURCE
+ #include "staprun.h"
+ #include "../privilege.h"
+ #include "../runtime/k_syms.h"
+ #include
+ #include
+ #include
+ #include
+ #include
+ #include
+
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc
index 56db7b2..72cd313 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -1,18 +1,19 @@
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRCREV = "508059f04842ed85d10bfbec8a9c688d57368860"
PV = "2.5+git${SRCPV}"
SRC_URI = "git://sourceware.org/git/systemtap.git \
file://docproc-build-fix.patch \
file://obsolete_automake_macros.patch \
+ file://systemtap-_BSD_SOURCE.patch \
"
FILESPATH = "${FILE_DIRNAME}/systemtap"
# systemtap doesn't support mips
COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64).*-linux'
S = "${WORKDIR}/git"
# systemtap can't be built without optimization, if someone tries to compile an