commit ac9e7fddf6c391bfdce7428c3775968b488f9e3d from: Tracey Emery date: Sat Jan 25 16:11:31 2020 UTC create temporary workaround to opening /dev/null during diffing. this will need to be reworked later. ok stsp commit - 91b8c405499bead2b9a0259bbeaf0e90381c8673 commit + ac9e7fddf6c391bfdce7428c3775968b488f9e3d blob - ba57c9a9820650433f49ef21d5eff17b52d34763 blob + 2087de25ba6cb1dce88c897e51280a9742651fd0 --- lib/diffreg.c +++ lib/diffreg.c @@ -91,6 +91,12 @@ #include "got_diff.h" #include "got_lib_diff.h" + +/* + * XXX:band-aid patch include + * remove when proper patch in place + */ +#include #define MINIMUM(a, b) (((a) < (b)) ? (a) : (b)) #define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b)) @@ -305,7 +311,7 @@ got_diffreg(int *rval, FILE *f1, FILE *f2, int flags, return NULL; } if (flags & D_EMPTY1) { - f1 = fopen(_PATH_DEVNULL, "r"); + f1 = got_opentemp(); if (f1 == NULL) { err = got_error_from_errno2("fopen", _PATH_DEVNULL); goto closem; @@ -317,7 +323,7 @@ got_diffreg(int *rval, FILE *f1, FILE *f2, int flags, } if (flags & D_EMPTY2) { - f2 = fopen(_PATH_DEVNULL, "r"); + f2 = got_opentemp(); if (f2 == NULL) { err = got_error_from_errno2("fopen", _PATH_DEVNULL); goto closem;