sysvinit: Fix build with glibc 2.28 + libxcrypt

(From OE-Core rev: 87f2683ca19182dbffe48dc70a1f2628658fc08d)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj
2018-08-08 10:04:25 -07:00
committed by Richard Purdie
parent 562210c8a0
commit 650cc7003e
2 changed files with 73 additions and 1 deletions

View File

@@ -0,0 +1,71 @@
From 29c7a529d3bb0c1e20239f885e74c5036f1a908c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 6 Aug 2018 15:38:58 -0700
Subject: [PATCH] include sys/sysmacros.h for major/minor defines in glibc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
---
src/bootlogd.c | 3 +++
src/bootlogd.o | Bin 58448 -> 60376 bytes
src/dowall.c | 3 +++
src/shutdown.c | 4 +++-
4 files changed, 9 insertions(+), 1 deletion(-)
Index: sysvinit-2.88dsf/src/bootlogd.c
===================================================================
--- sysvinit-2.88dsf.orig/src/bootlogd.c
+++ sysvinit-2.88dsf/src/bootlogd.c
@@ -53,6 +53,9 @@
#ifdef __linux__
#include <sys/mount.h>
#endif
+#ifdef __GLIBC__
+#include <sys/sysmacros.h>
+#endif
char *Version = "@(#) bootlogd 2.86 03-Jun-2004 miquels@cistron.nl";
Index: sysvinit-2.88dsf/src/dowall.c
===================================================================
--- sysvinit-2.88dsf.orig/src/dowall.c
+++ sysvinit-2.88dsf/src/dowall.c
@@ -37,6 +37,9 @@
#include <signal.h>
#include <setjmp.h>
#include <paths.h>
+#ifdef __GLIBC__
+#include <sys/sysmacros.h>
+#endif
#ifndef _PATH_DEV
# define _PATH_DEV "/dev/"
Index: sysvinit-2.88dsf/src/shutdown.c
===================================================================
--- sysvinit-2.88dsf.orig/src/shutdown.c
+++ sysvinit-2.88dsf/src/shutdown.c
@@ -57,7 +57,9 @@
#include "reboot.h"
#include "initreq.h"
#include "init.h"
-
+#ifdef __GLIBC__
+#include <sys/sysmacros.h>
+#endif
char *Version = "@(#) shutdown 2.86-1 31-Jul-2004 miquels@cistron.nl";
Index: sysvinit-2.88dsf/src/mountpoint.c
===================================================================
--- sysvinit-2.88dsf.orig/src/mountpoint.c
+++ sysvinit-2.88dsf/src/mountpoint.c
@@ -32,6 +32,9 @@
#include <stdarg.h>
#include <getopt.h>
#include <stdio.h>
+#ifdef __GLIBC__
+#include <sys/sysmacros.h>
+#endif
int dostat(char *path, struct stat *st, int do_lstat, int quiet)
{

View File

@@ -15,6 +15,7 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/sysvinit/sysvinit-${PV}.tar.bz2 \
file://pidof-add-m-option.patch \
file://0001-This-fixes-an-issue-that-clang-reports-about-mutlipl.patch \
file://realpath.patch \
file://0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch \
file://rcS-default \
file://rc \
file://rcS \
@@ -29,7 +30,7 @@ S = "${WORKDIR}/sysvinit-${PV}"
B = "${S}/src"
inherit update-alternatives distro_features_check
DEPENDS_append = " update-rc.d-native base-passwd"
DEPENDS_append = " update-rc.d-native base-passwd virtual/crypt"
REQUIRED_DISTRO_FEATURES = "sysvinit"