mirror of
https://github.com/postgres/postgres.git
synced 2025-11-25 12:03:53 +03:00
Fix portability problem induced by commit a6f6b7819.
pg_xlogdump includes bufmgr.h. With a compiler that emits code for static inline functions even when they're unreferenced, that leads to unresolved external references in the new static-inline version of BufferGetPage(). So hide it with #ifndef FRONTEND, as we've done for similar issues elsewhere. Per buildfarm member pademelon.
This commit is contained in:
@@ -252,6 +252,15 @@ extern void FreeAccessStrategy(BufferAccessStrategy strategy);
|
||||
|
||||
/* inline functions */
|
||||
|
||||
/*
|
||||
* Although this header file is nominally backend-only, certain frontend
|
||||
* programs like pg_xlogdump include it. For compilers that emit static
|
||||
* inline functions even when they're unused, that leads to unsatisfied
|
||||
* external references; hence hide these with #ifndef FRONTEND.
|
||||
*/
|
||||
|
||||
#ifndef FRONTEND
|
||||
|
||||
/*
|
||||
* BufferGetPage
|
||||
* Returns the page associated with a buffer.
|
||||
@@ -272,4 +281,6 @@ BufferGetPage(Buffer buffer, Snapshot snapshot, Relation relation,
|
||||
return page;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* FRONTEND */
|
||||
|
||||
#endif /* BUFMGR_H */
|
||||
|
||||
Reference in New Issue
Block a user