From: John Wolfe Date: Sat, 25 Dec 2021 17:51:13 +0000 (-0800) Subject: Common source file changes not directly applicable to open-vm-tools. X-Git-Tag: stable-12.0.0~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6d49e0acd81353d8022b639e231bc517a69b166;p=thirdparty%2Fopen-vm-tools.git Common source file changes not directly applicable to open-vm-tools. --- diff --git a/open-vm-tools/lib/include/poll.h b/open-vm-tools/lib/include/poll.h index c90f5dcd1..ade356b9f 100644 --- a/open-vm-tools/lib/include/poll.h +++ b/open-vm-tools/lib/include/poll.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2020 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2021 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -254,6 +254,7 @@ void Poll_InitDefaultEx(const PollOptions *opts); void Poll_InitGtk(void); // On top of glib for Linux void Poll_InitCF(void); // On top of CoreFoundation for OSX +Bool Poll_IsInitialized(void); /* * Functions diff --git a/open-vm-tools/lib/poll/poll.c b/open-vm-tools/lib/poll/poll.c index 580b5c96f..c568632b5 100644 --- a/open-vm-tools/lib/poll/poll.c +++ b/open-vm-tools/lib/poll/poll.c @@ -114,6 +114,30 @@ Poll_InitWithImpl(const PollImpl *impl) pollImpl->Init(); } + +/* + *---------------------------------------------------------------------- + * + * Poll_IsInitialized -- + * + * Allows libraries to determine if they can use poll or not. + * + * Results: + * TRUE if and only if poll is initialized. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Bool +Poll_IsInitialized(void) +{ + return pollImpl != NULL; +} + + /* *---------------------------------------------------------------------- *