2020-06-26 16:50:49 -04:00
|
|
|
/*
|
|
|
|
|
ISC License
|
|
|
|
|
|
2026-02-23 13:22:21 -06:00
|
|
|
Copyright (c) 2026, Antonio SJ Musumeci <trapexit@spawn.link>
|
2020-06-26 16:50:49 -04:00
|
|
|
|
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
|
purpose with or without fee is hereby granted, provided that the above
|
|
|
|
|
copyright notice and this permission notice appear in all copies.
|
|
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
|
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
|
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2025-07-25 17:53:48 -05:00
|
|
|
#include "to_neg_errno.hpp"
|
|
|
|
|
|
2020-08-17 16:29:22 -04:00
|
|
|
#include <sys/stat.h>
|
|
|
|
|
|
2020-12-19 15:06:08 -05:00
|
|
|
|
2020-06-26 16:50:49 -04:00
|
|
|
namespace fs
|
|
|
|
|
{
|
2020-08-17 16:29:22 -04:00
|
|
|
static
|
|
|
|
|
inline
|
2020-06-26 16:50:49 -04:00
|
|
|
int
|
2020-08-17 16:29:22 -04:00
|
|
|
futimens(const int fd_,
|
|
|
|
|
const struct timespec ts_[2])
|
|
|
|
|
{
|
2025-07-25 17:53:48 -05:00
|
|
|
int rv;
|
|
|
|
|
|
|
|
|
|
rv = ::futimens(fd_,ts_);
|
|
|
|
|
|
|
|
|
|
return ::to_neg_errno(rv);
|
2020-08-17 16:29:22 -04:00
|
|
|
}
|
2020-06-26 16:50:49 -04:00
|
|
|
}
|