7 Star 1 Fork 5

src-openEuler / lockdev

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-major-and-minor-functions-moved-to-sysmacros.h.patch 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
hexiaowen 提交于 2019-09-30 11:02 . Package init
From fb98a845d155fdfbd45c22a6b062c3cfbe692a0a Mon Sep 17 00:00:00 2001
From: Sebastian Kisela <skisela@redhat.com>
Date: Wed, 25 Jul 2018 09:18:33 +0200
Subject: [PATCH] major and minor functions moved to sysmacros.h
According to https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=NEWS;hb=HEAD
(glibc changelog) the below happened, therefore explicitly include
<sys/sysmacros.h>
"
...
The macros 'major', 'minor', and 'makedev' are now only available from
the header <sys/sysmacros.h>; not from <sys/types.h> or various other
headers that happen to include <sys/types.h>. These macros are rarely
used, not part of POSIX nor XSI, and their names frequently collide with
user code; see https://sourceware.org/bugzilla/show_bug.cgi?id=19239 for
further explanation.
<sys/sysmacros.h> is a GNU extension. Portable programs that require
these macros should first include <sys/types.h>, and then include
<sys/sysmacros.h> if __GNU_LIBRARY__ is defined.
...
"
Signed-off-by: Sebastian Kisela <skisela@redhat.com>
---
src/lockdev.c | 1 +
1 files changed, 1 insertions(+)
diff --git a/src/lockdev.c b/src/lockdev.c
index 6e69894..ec86f65 100644
--- a/src/lockdev.c
+++ b/src/lockdev.c
@@ -121,6 +121,7 @@
#include <sys/stat.h>
#include <sys/file.h>
#include <sys/types.h>
+#include <sys/sysmacros.h>
#include <sys/wait.h>
#include "lockdev.h"
#include "ttylock.h"
--
2.14.4
1
https://gitee.com/src-openeuler/lockdev.git
git@gitee.com:src-openeuler/lockdev.git
src-openeuler
lockdev
lockdev
master

搜索帮助