Skip to content

Commit

Permalink
common: fix support of OS_DIMM_CFLAG
Browse files Browse the repository at this point in the history
`#if NDCTL_ENABLED` that is used in the source code expects
that `NDCTL_ENABLED` is defined all the time with either *0*
or *non-0* value.

Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
  • Loading branch information
grom72 committed Mar 27, 2024
1 parent d4bd6f2 commit 61c6c1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,7 @@ NDCTL_ENABLE ?= y
ifeq ($(NDCTL_ENABLE),y)
ifeq ($(LIBNDCTL_LIBS),)
HAS_NDCTL := $(call check_package, libndctl --atleast-version $(NDCTL_MIN_VERSION))
ifeq ($(HAS_NDCTL),y)
OS_DIMM_CFLAG=-DNDCTL_ENABLED=1
else
ifeq ($(HAS_NDCTL),n)
$(error Please install libndctl-dev/libndctl-devel/ndctl-devel >= $(NDCTL_MIN_VERSION))
endif
HAS_DAXCTL := $(call check_package, libdaxctl --atleast-version $(NDCTL_MIN_VERSION))
Expand All @@ -348,8 +346,10 @@ ifeq ($(NDCTL_ENABLE),y)
LIBNDCTL_LIBS := $(shell $(PKG_CONFIG) --libs $(LIBNDCTL_PKG_CONFIG_DEPS))
endif
OS_DIMM := ndctl
OS_DIMM_CFLAG=-DNDCTL_ENABLED=1
else
OS_DIMM := none
OS_DIMM_CFLAG=-DNDCTL_ENABLED=0
endif
export OS_DIMM
export LIBNDCTL_PKG_CONFIG_DEPS
Expand Down

0 comments on commit 61c6c1a

Please sign in to comment.