diff options
author | Remi Collet <remi@remirepo.net> | 2023-10-12 15:19:36 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2023-10-12 15:19:36 +0200 |
commit | 8bf3b94ac38682b4e5f1553ce0a501873dbcb855 (patch) | |
tree | 62facf14dac55546e421f85e0b8c565443a30345 /rpminfo.c | |
parent | 16192a25a02e72eee26009f47bf85e0644ac3daf (diff) |
implement fstat
Diffstat (limited to 'rpminfo.c')
-rw-r--r-- | rpminfo.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -608,6 +608,15 @@ static int php_rpm_ops_close(php_stream *stream, int close_handle) return EOF; } +static int php_zip_ops_stat(php_stream *stream, php_stream_statbuf *ssb) +{ + STREAM_DATA_FROM_STREAM(); + + if (self) { + return rpmfiStat(self->fi, 0, &ssb->sb); + } + return -1; +} const php_stream_ops php_stream_rpmio_ops = { NULL, /* write */ @@ -617,7 +626,7 @@ const php_stream_ops php_stream_rpmio_ops = { "rpm", NULL, /* seek */ NULL, /* cast */ - NULL, /* stat */ + php_zip_ops_stat, NULL /* set_option */ }; |