Skip to content

Commit

Permalink
[GR-19220] Add semicolon to the buffer atime assignment (#2661)
Browse files Browse the repository at this point in the history
PullRequest: truffleruby/3362
  • Loading branch information
eregon committed May 27, 2022
2 parents e734372 + 012ae87 commit c52e632
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions mx.truffleruby/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,13 +306,11 @@
"native": True,
"dir": "src/main/c",
"buildDependencies": [
"truffle:TRUFFLE_NFI_NATIVE", # trufflenfi.h
"sulong:SULONG_BOOTSTRAP_TOOLCHAIN", # graalvm-native-clang
"sulong:SULONG_HOME", # polyglot.h
"TRUFFLERUBY-BOOTSTRAP-LAUNCHER",
],
"buildEnv": {
"NFI_HEADERS_DIR": "<path:truffle:TRUFFLE_NFI_NATIVE>/include",
"TRUFFLERUBY_BOOTSTRAP_LAUNCHER": "<path:TRUFFLERUBY-BOOTSTRAP-LAUNCHER>/miniruby",
"GRAALVM_TOOLCHAIN_CC": "<toolchainGetToolPath:native,CC>",
},
Expand Down
2 changes: 1 addition & 1 deletion src/main/c/truffleposix/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ libtruffleposix.$(SOEXT): truffleposix.o Makefile
$(Q) $(CC) -shared $(LDFLAGS) -o $@ $<

truffleposix.o: truffleposix.c Makefile
$(Q) $(CC) -o $@ -c $(CFLAGS) $(LDFLAGS) -I$(NFI_HEADERS_DIR) -I$(RUBY_HDR_DIR) $<
$(Q) $(CC) -o $@ -c $(CFLAGS) $(LDFLAGS) -I$(RUBY_HDR_DIR) $<
4 changes: 1 addition & 3 deletions src/main/c/truffleposix/truffleposix.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ SUCH DAMAGE.
#include <sys/sysmacros.h>
#endif

#include <trufflenfi.h>

struct truffleposix_stat {
uint64_t atime;
uint64_t mtime;
Expand Down Expand Up @@ -467,7 +465,7 @@ static void copy_stat(struct stat *native_stat, struct truffleposix_stat* buffer
#elif defined(HAVE_STRUCT_STAT_ST_ATIMENSEC)
buffer->atime_nsec = (long)native_stat->st_atimensec;
#else
buffer->atime_nsec = 0
buffer->atime_nsec = 0;
#endif
#if defined(HAVE_STRUCT_STAT_ST_MTIM)
buffer->mtime_nsec = native_stat->st_mtim.tv_nsec;
Expand Down

0 comments on commit c52e632

Please sign in to comment.