Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcov: add missing gcov.h includes #4360

Merged
merged 1 commit into from
Jun 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/firejail/appimage.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
#include <linux/loop.h>
#include <errno.h>

#ifdef HAVE_GCOV
#include <gcov.h>
#endif

static char *devloop = NULL; // device file
static long unsigned size = 0; // offset into appimage file
#define MAXBUF 4096
Expand Down
3 changes: 3 additions & 0 deletions src/firejail/chroot.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
#define O_PATH 010000000
#endif

#ifdef HAVE_GCOV
#include <gcov.h>
#endif

// exit if error
void fs_check_chroot_dir(void) {
Expand Down
4 changes: 4 additions & 0 deletions src/firejail/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
#define O_PATH 010000000
#endif

#ifdef HAVE_GCOV
#include <gcov.h>
#endif

#define MAX_BUF 4096
#define EMPTY_STRING ("")
// check noblacklist statements not matched by a proper blacklist in disable-*.inc files
Expand Down
3 changes: 3 additions & 0 deletions src/firejail/fs_mkdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
#include <sys/wait.h>
#include <string.h>

#ifdef HAVE_GCOV
#include <gcov.h>
#endif

static void check(const char *fname) {
// manufacture /run/user directory
Expand Down
4 changes: 4 additions & 0 deletions src/firejail/ls.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
//#include <stdio.h>
//#include <stdlib.h>

#ifdef HAVE_GCOV
#include <gcov.h>
#endif

// uid/gid cache
static uid_t c_uid = 0;
static char *c_uid_name = NULL;
Expand Down
4 changes: 4 additions & 0 deletions src/firejail/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
#define O_PATH 010000000
#endif

#ifdef HAVE_GCOV
#include <gcov.h>
#endif

#ifdef __ia64__
/* clone(2) has a different interface on ia64, as it needs to know
the size of the stack */
Expand Down
5 changes: 5 additions & 0 deletions src/firejail/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
#include "../include/syscall.h"
#include <dirent.h>
#include <sys/stat.h>

#ifdef HAVE_GCOV
#include <gcov.h>
#endif

extern char *xephyr_screen;

#define MAX_READ 8192 // line buffer for profile files
Expand Down
4 changes: 4 additions & 0 deletions src/firejail/rlimit.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
#include <sys/time.h>
#include <sys/resource.h>

#ifdef HAVE_GCOV
#include <gcov.h>
#endif

void set_rlimits(void) {
EUID_ASSERT();
// resource limits
Expand Down
3 changes: 3 additions & 0 deletions src/firejail/sandbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
#include <sys/apparmor.h>
#endif

#ifdef HAVE_GCOV
#include <gcov.h>
#endif

static int force_nonewprivs = 0;

Expand Down
4 changes: 4 additions & 0 deletions src/firejail/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
#include <linux/openat2.h>
#endif

#ifdef HAVE_GCOV
#include <gcov.h>
#endif

#define MAX_GROUPS 1024
#define MAXBUF 4098
#define EMPTY_STRING ("")
Expand Down
4 changes: 4 additions & 0 deletions src/firemon/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
//#include <net/route.h>
//#include <linux/if_bridge.h>

#ifdef HAVE_GCOV
#include <gcov.h>
#endif

// print IP addresses for all interfaces
static void net_ifprint(void) {
uint32_t ip;
Expand Down
4 changes: 4 additions & 0 deletions src/firemon/netstats.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
#include <sys/stat.h>
#include <unistd.h>

#ifdef HAVE_GCOV
#include <gcov.h>
#endif

#define MAXBUF 4096

// ip -s link: device stats
Expand Down
4 changes: 4 additions & 0 deletions src/firemon/procevent.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
#include <fcntl.h>
#include <sys/uio.h>

#ifdef HAVE_GCOV
#include <gcov.h>
#endif

#define PIDS_BUFLEN 4096
#define SERVER_PORT 889 // 889-899 is left unassigned by IANA

Expand Down
4 changes: 4 additions & 0 deletions src/firemon/top.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
#include <sys/stat.h>
#include <unistd.h>

#ifdef HAVE_GCOV
#include <gcov.h>
#endif

static unsigned pgs_rss = 0;
static unsigned pgs_shared = 0;
static unsigned clocktick = 0;
Expand Down