nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: linux-nvdimm@lists.01.org
Subject: [ndctl PATCH] ndctl: export ndctl.h
Date: Wed, 04 Apr 2018 15:02:27 -0700	[thread overview]
Message-ID: <152287934701.9679.14197084162568828006.stgit@dwillia2-desk3.amr.corp.intel.com> (raw)

The ndctl project maintains a local version of the ndctl.h header file
published by the kernel. Given that the kernel header may be out of date
relative to the header used to build ndctl, provide the local version in
ndctl/ndctl.h alongside ndctl/libndctl.h so that consumers of the
library have access to the same definitions used to build the library.

Reported-by: Juston Li <juston.li@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 ndctl/lib/Makefile.am         |    2 +-
 ndctl/ndctl.h                 |    2 ++
 test/ack-shutdown-count-set.c |    3 ---
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/ndctl/lib/Makefile.am b/ndctl/lib/Makefile.am
index e3a12e7177e9..77970399bf00 100644
--- a/ndctl/lib/Makefile.am
+++ b/ndctl/lib/Makefile.am
@@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.am.in
 %.pc: %.pc.in Makefile
 	$(SED_PROCESS)
 
-pkginclude_HEADERS = ../libndctl.h
+pkginclude_HEADERS = ../libndctl.h ../ndctl.h
 lib_LTLIBRARIES = libndctl.la
 
 libndctl_la_SOURCES =\
diff --git a/ndctl/ndctl.h b/ndctl/ndctl.h
index ebd2a41cce46..c6aaa4c0981f 100644
--- a/ndctl/ndctl.h
+++ b/ndctl/ndctl.h
@@ -13,7 +13,9 @@
 #ifndef __NDCTL_H__
 #define __NDCTL_H__
 
+#ifndef ARRAY_SIZE
 #include <ccan/array_size/array_size.h>
+#endif
 #include <linux/types.h>
 #include <sys/user.h>
 #include <unistd.h>
diff --git a/test/ack-shutdown-count-set.c b/test/ack-shutdown-count-set.c
index ef38176442f1..6766c5f3b021 100644
--- a/test/ack-shutdown-count-set.c
+++ b/test/ack-shutdown-count-set.c
@@ -15,9 +15,6 @@
 
 #include <ccan/array_size/array_size.h>
 #include <ndctl/libndctl.h>
-#ifdef HAVE_NDCTL_H
-#include <linux/ndctl.h>
-#else
 #include <ndctl.h>
 #endif
 #include <test.h>

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

             reply	other threads:[~2018-04-04 22:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-04 22:02 Dan Williams [this message]
2018-04-06 21:41 ` [ndctl PATCH] ndctl: export ndctl.h Verma, Vishal L

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=152287934701.9679.14197084162568828006.stgit@dwillia2-desk3.amr.corp.intel.com \
    --to=dan.j.williams@intel.com \
    --cc=linux-nvdimm@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).