Skip to content

Commit

Permalink
[osg] Fix error C3861: '_FPOSOFF': identifier not found (#38666)
Browse files Browse the repository at this point in the history
Fix error:
```
D:\b\osg\src\raph-3.6.5-c3f8c61ada.clean\src\osgPlugins\osga\OSGA_Archive.cpp(80): error C3861: '_FPOSOFF': identifier not found
```
  • Loading branch information
FrankXie05 authored Jun 12, 2024
1 parent 72f7002 commit ff2b8b4
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
13 changes: 13 additions & 0 deletions ports/osg/fix-error-c3861.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/osgPlugins/osga/OSGA_Archive.cpp b/src/osgPlugins/osga/OSGA_Archive.cpp
index b9f518a..19186a7 100644
--- a/src/osgPlugins/osga/OSGA_Archive.cpp
+++ b/src/osgPlugins/osga/OSGA_Archive.cpp
@@ -77,7 +77,7 @@ inline OSGA_Archive::pos_type ARCHIVE_POS( const std::streampos & pos )
#else // older Dinkumware (eg: one included in Win Server 2003 Platform SDK )
fpos_t position = pos.get_fpos_t();
#endif
- std::streamoff offset = pos.operator std::streamoff( ) - _FPOSOFF( position );
+ std::streamoff offset = 0;

return OSGA_Archive::pos_type( position + offset );
}
1 change: 1 addition & 0 deletions ports/osg/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ vcpkg_from_github(
openexr3.patch
unofficial-export.patch
fix-min-max-macro.patch
fix-error-c3861.patch
)

file(REMOVE
Expand Down
2 changes: 1 addition & 1 deletion ports/osg/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "osg",
"version": "3.6.5",
"port-version": 24,
"port-version": 25,
"description": "The OpenSceneGraph is an open source high performance 3D graphics toolkit.",
"homepage": "https://www.openscenegraph.com/",
"license": null,
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6622,7 +6622,7 @@
},
"osg": {
"baseline": "3.6.5",
"port-version": 24
"port-version": 25
},
"osg-qt": {
"baseline": "Qt5",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/osg.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "c4fe8448842ded8e44e53c90f6a02b08a1582266",
"version": "3.6.5",
"port-version": 25
},
{
"git-tree": "1d1d4f2ebd90418968f77f5fa31f45a1a4df9a12",
"version": "3.6.5",
Expand Down

0 comments on commit ff2b8b4

Please sign in to comment.