Print this page
3748 zfs headers should be C++ compatible
Submitted by:   Justin Gibbs <justing@spectralogic.com>
Submitted by:   Will Andrews <willa@spectralogic.com>
Reviewed by:    Matthew Ahrens <mahrens@delphix.com>

@@ -22,12 +22,12 @@
 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 # Copyright (c) 2012 by Delphix. All rights reserved.
 #
 
 PROG= ztest
-OBJS= $(PROG).o
-SRCS= $(OBJS:%.o=../%.c)
+OBJS= $(PROG).o ztest_util.o
+SRCS= $(OBJS:%.o=../%.c) ztest_util.cpp
 
 include ../../Makefile.cmd
 include ../../Makefile.ctf
 
 INCS += -I../../../lib/libzpool/common

@@ -60,8 +60,12 @@
 
 lint:   lint_SRCS
 
 include ../../Makefile.targ
 
+%.o: ../%.cpp
+        $(COMPILE.cc) $<
+        $(POST_PROCESS_O)
+
 %.o: ../%.c
         $(COMPILE.c) $<
         $(POST_PROCESS_O)