Add inotify watch support

Added code to register for inotify events on the needed
path and the user callback on events

Change-Id: I90529f8e96fcbecfe0a1b943c3c435dab79222c3
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index 5c70fbe..5a1e712 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -2,7 +2,7 @@
 
 TESTS = $(check_PROGRAMS)
 
-check_PROGRAMS = test test_dns_updater
+check_PROGRAMS = test test_dns_updater test_watch
 
 test_SOURCES = \
 	test_util.cpp \
@@ -13,6 +13,7 @@
 	test_vlan_interface.cpp
 
 test_dns_updater_SOURCES = test_dns_updater.cpp
+test_watch_SOURCES = test_watch.cpp
 
 generic_cpp_flags = -Igtest $(GTEST_CPPFLAGS) $(AM_CPPFLAGS)
 
@@ -37,6 +38,10 @@
 test_dns_updater_CXXFLAGS = ${generic_cxx_flags}
 test_dns_updater_LDFLAGS  = ${generic_ld_flags}
 
+test_watch_CPPFLAGS = ${generic_cpp_flags}
+test_watch_CXXFLAGS = ${generic_cxx_flags}
+test_watch_LDFLAGS  = ${generic_ld_flags}
+
 test_LDADD = $(top_builddir)/ethernet_interface.o \
 			$(top_builddir)/network_manager.o \
 			$(top_builddir)/network_config.o \
@@ -52,3 +57,4 @@
 			$(top_builddir)/xyz/openbmc_project/Network/IP/Create/phosphor_network_manager-server.o
 
 test_dns_updater_LDADD = $(top_builddir)/dns_updater.o
+test_watch_LDADD = $(top_builddir)/watch.o