https://github.com/iovisor/bcc/pull/5481

--- bcc/src/cc/bcc_perf_map.c
+++ bcc/src/cc/bcc_perf_map.c
@@ -23,7 +23,7 @@
 #include "bcc_perf_map.h"
 
 bool bcc_is_perf_map(const char *path) {
-  char* pos = strstr(path, ".map");
+  const char* pos = strstr(path, ".map");
   // Path ends with ".map"
   return (pos != NULL) && (*(pos + 4)== 0);
 }
--- bcc/src/cc/libbpf.c
+++ bcc/src/cc/libbpf.c
@@ -787,7 +787,7 @@ int bcc_prog_load_xattr(enum bpf_prog_ty
   int ret = 0, name_offset = 0, expected_attach_type = 0;
   char new_prog_name[BPF_OBJ_NAME_LEN] = {};
   char mod_name[64] = {};
-  char *mod_end;
+  const char *mod_end;
   int mod_len;
   int fd = -1;
 
