Cygwin: clipboard: Only SEEK_SET and SEEK_CUR are supported

Make sure of that, especially given the addition of
SEEK_DATA and SEEK_HOLE.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2023-08-09 16:56:02 +02:00
parent 07092a52e9
commit 5b53633b5d
1 changed files with 7 additions and 0 deletions

View File

@ -322,6 +322,13 @@ fhandler_dev_clipboard::lseek (off_t offset, int whence)
* On writes we use this to decide how to write - empty and write, or open, copy, empty
* and write
*/
if (whence == SEEK_CUR)
return 0;
if (whence != SEEK_SET)
{
set_errno (EINVAL);
return -1;
}
pos = offset;
/* treat seek like rewind */
if (membuffer)