]> granicus.if.org Git - sysstat/commitdiff
sadf: PCP: Add missing #ifdef statement
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 23 Feb 2019 17:45:05 +0000 (18:45 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 23 Feb 2019 17:45:05 +0000 (18:45 +0100)
pmiWrite() function only exists if PCP library exists.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
sadf_misc.c

index 624a78def3179b8bb22ab750cac0572c13a4a277..c3b6cbc73eb1bbe869f47abfe07fb15aecb464c9 100644 (file)
@@ -778,6 +778,7 @@ __tm_funct_t print_pcp_timestamp(void *parm, int action, char *cur_date,
                                 struct record_header *record_hdr,
                                 struct file_header *file_hdr, unsigned int flags)
 {
+#ifdef HAVE_PCP
        int rc;
 
        if (action & F_END) {
@@ -786,7 +787,7 @@ __tm_funct_t print_pcp_timestamp(void *parm, int action, char *cur_date,
                        exit(4);
                }
        }
-
+#endif
        return NULL;
 }