diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-02-24 17:18:08 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-02-24 17:18:08 +0100 |
commit | 1232f3482b272fbe8986c9677b529ec7b6cb0183 (patch) | |
tree | 7c17e8177d2aef5df4a80344ec4d0c64ca616355 /src/blogc-make/ctx.h | |
parent | 6bc34603d772fedcd90ffd0d198622e6582a44b1 (diff) | |
download | blogc-1232f3482b272fbe8986c9677b529ec7b6cb0183.tar.gz blogc-1232f3482b272fbe8986c9677b529ec7b6cb0183.tar.bz2 blogc-1232f3482b272fbe8986c9677b529ec7b6cb0183.zip |
make: do not run stat twice for regular files when copying
Diffstat (limited to 'src/blogc-make/ctx.h')
-rw-r--r-- | src/blogc-make/ctx.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/blogc-make/ctx.h b/src/blogc-make/ctx.h index 1c9d8b0..3f70ead 100644 --- a/src/blogc-make/ctx.h +++ b/src/blogc-make/ctx.h @@ -9,6 +9,7 @@ #ifndef _MAKE_CTX_H #define _MAKE_CTX_H +#include <sys/stat.h> #include <stdbool.h> #include <time.h> #include "settings.h" @@ -63,7 +64,7 @@ typedef struct { bc_slist_t *copy_fctx; } bm_ctx_t; -bm_filectx_t* bm_filectx_new(bm_ctx_t *ctx, const char *filename); +bm_filectx_t* bm_filectx_new(bm_ctx_t *ctx, const char *filename, struct stat *st); bc_slist_t* bm_filectx_new_r(bc_slist_t *l, bm_ctx_t *ctx, const char *filename); bool bm_filectx_changed(bm_filectx_t *ctx, time_t *tv_sec, long *tv_nsec); void bm_filectx_reload(bm_filectx_t *ctx); |