diff options
-rw-r--r-- | kilo.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -34,8 +34,7 @@ #define KILO_VERSION "0.0.1" -#define _BSD_SOURCE -#define _GNU_SOURCE +#define _POSIX_C_SOURCE 200809L #include <termios.h> #include <stdlib.h> @@ -43,6 +42,7 @@ #include <errno.h> #include <string.h> #include <ctype.h> +#include <time.h> #include <sys/types.h> #include <sys/ioctl.h> #include <sys/time.h> @@ -997,6 +997,7 @@ void editorFind(int fd) { #define FIND_RESTORE_HL do { \ if (saved_hl) { \ memcpy(E.row[saved_hl_line].hl,saved_hl, E.row[saved_hl_line].rsize); \ + free(saved_hl); \ saved_hl = NULL; \ } \ } while (0) |